Skip to content

Actually remove stale container images #141

Actually remove stale container images

Actually remove stale container images #141

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@7ca345011ac4304463197fac0e56eab1bc7e6af0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@7e094594beda23fc8f21fa31049f4b203e51096b
with:
context: ledgersmb/
push: true
tags: ${{ env.REGISTRY }}/ledgersmb/dev-ledgersmb:latest
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@7ca345011ac4304463197fac0e56eab1bc7e6af0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@7e094594beda23fc8f21fa31049f4b203e51096b
with:
context: nginx/
push: true
tags: ${{ env.REGISTRY }}/ledgersmb/dev-nginx:latest
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@7ca345011ac4304463197fac0e56eab1bc7e6af0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@7e094594beda23fc8f21fa31049f4b203e51096b
with:
build-args: |
PGBASE=${{ matrix.pg_version }}
context: postgres/
push: true
tags: ${{ env.REGISTRY }}/ledgersmb/dev-postgres:${{ matrix.pg_version }}
cleanup:
runs-on: ubuntu-latest
needs: [ 'ledgersmb', 'proxy', 'postgres' ]
steps:
- name: ghcr.io cleanup action
uses: dataaxiom/ghcr-cleanup-action@v1
with:
packages: dev-postgres,dev-ledgersmb,dev-nginx