Skip to content

Merge pull request #58 from ledgersmb/renovate/docker-build-push-acti… #118

Merge pull request #58 from ledgersmb/renovate/docker-build-push-acti…

Merge pull request #58 from ledgersmb/renovate/docker-build-push-acti… #118

Workflow file for this run

name: Docker Image CI
on:
repository_dispatch:
types: [ master-updated ]
workflow_dispatch:
push:
branches:
- 'master'
env:
REGISTRY: ghcr.io
jobs:
ledgersmb:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
context: ledgersmb/
push: true
tags: ${{ env.REGISTRY }}/ledgersmb/dev-ledgersmb:latest
- name: Clean GHCR.io registry 'dev-ledgersmb' package
uses: actions/delete-package-versions@v5
with:
package-name: dev-ledgersmb
package-type: container
delete-only-untagged-versions: true
min-versions-to-keep: 0
num-old-versions-to-delete:
ignore-versions:
delete-only-pre-release-versions:
proxy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
context: nginx/
push: true
tags: ${{ env.REGISTRY }}/ledgersmb/dev-nginx:latest
- name: Clean GHCR.io registry 'dev-nginx' package
uses: actions/delete-package-versions@v5
with:
package-name: dev-nginx
package-type: container
delete-only-untagged-versions: true
min-versions-to-keep: 0
num-old-versions-to-delete:
ignore-versions:
delete-only-pre-release-versions:
postgres:
runs-on: ubuntu-latest
strategy:
matrix:
pg_version: [ "latest", "14", "13", "12" ]
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c
with:
build-args: |
PGBASE=${{ matrix.pg_version }}
context: postgres/
push: true
tags: ${{ env.REGISTRY }}/ledgersmb/dev-postgres:${{ matrix.pg_version }}
- name: Clean GHCR.io registry 'dev-postgres' package
uses: actions/delete-package-versions@v5
with:
package-name: dev-postgres
package-type: container
delete-only-untagged-versions: true
min-versions-to-keep: 0
num-old-versions-to-delete:
ignore-versions:
delete-only-pre-release-versions: