Skip to content

Remove EOLed containers and add Debian 12 i386/Fedora 40 containers. #64

Remove EOLed containers and add Debian 12 i386/Fedora 40 containers.

Remove EOLed containers and add Debian 12 i386/Fedora 40 containers. #64

name: build-containers
on:
push:
# branches: [ main ]
# paths-ignore:
# - '**.adoc'
tags: [ 'v*' ]
pull_request:
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true
jobs:
build-containers:
name: ${{ matrix.container }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
container:
- 'centos-7-amd64'
- 'centos-9-amd64'
- 'fedora-39-amd64'
- 'fedora-40-amd64'
- 'debian-11-amd64'
- 'debian-11-i386'
- 'debian-12-amd64'
- 'debian-12-i386'
- 'opensuse-leap'
- 'opensuse-tumbleweed'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: rnpgp
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./${{ matrix.container }}.Dockerfile
push: ${{ contains(github.ref, 'refs/tags/v') }}
tags: ghcr.io/rnpgp/ci-rnp-${{ matrix.container }}
labels: |
latest
"org.opencontainers.image.source=${{ github.repositoryUrl }}"
- name: Purge old versions
if: contains(github.ref, 'refs/tags/v')
continue-on-error: true
uses: actions/delete-package-versions@v4
with:
package-name: 'ci-rnp-${{ matrix.container }}'
package-type: 'container'
min-versions-to-keep: 1
delete-only-untagged-versions: 'true'