Skip to content

Added docker files for Fedora images #50

Added docker files for Fedora images

Added docker files for Fedora images #50

name: build-containers
on:
push:
branches: [ main, centos-containers ]
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 }} [CC ${{ matrix.compiler.cc }}; GnuPG - system shipped]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
container:
- 'centos-7-amd64'
- 'centos-8-amd64'
- 'centos-9-amd64'
- 'fedora-3.5-amd64'
- 'fedora-3.6-amd64'
- 'debian-11-amd64'
- 'debian-11-i386'
- 'debian-10-i386'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
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/${{ github.actor }}/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 }}-${{ matrix.compiler.cc }}'
package-type: 'container'
min-versions-to-keep: 1
delete-only-untagged-versions: 'true'