AlmaLinux.9 - systemd #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "AlmaLinux.9 - systemd" | |
'on': | |
push: | |
branches: | |
- main | |
paths: | |
- "Containerfiles/systemd/AlmaLinux/AlmaLinux.9.Containerfile" | |
- ".github/workflows/systemd-AlmaLinux.9-ci.yml" | |
schedule: | |
- cron: "10 1 * * 0" | |
workflow_dispatch: | |
jobs: | |
build_push: | |
name: Build and Push container images to quay.io | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Calculate Docker image tags # Based on https://gist.github.com/sagikazarmark/0119e1f3dde0d8e755fd0ee5a5ef4cdc | |
id: tags | |
run: | | |
case $GITHUB_REF in | |
refs/tags/*) VERSION=${GITHUB_REF#refs/tags/};; | |
refs/heads/*) VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g');; | |
refs/pull/*) VERSION=pr-${{ github.event.number }};; | |
*) VERSION=sha-${GITHUB_SHA::8};; | |
esac | |
echo version=${VERSION} >> ${GITHUB_OUTPUT} | |
echo commit_hash=${GITHUB_SHA::8} >> ${GITHUB_OUTPUT} | |
echo build_date=$(git show -s --format=%cI) >> ${GITHUB_OUTPUT} | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
- name: Login to quay.io | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Build and push image. | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./Containerfiles/systemd/AlmaLinux | |
file: ./Containerfiles/systemd/AlmaLinux/AlmaLinux.9.Containerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
labels: | | |
org.opencontainers.image.tite="AlmaLinux image with systemd" | |
org.opencontainers.image.description="AlmaLinux image with systemd for Ansible testing using Podman and Molecule" | |
org.opencontainers.image.url=${{ github.event.repository.html_url }}/tree/main/Containerfiles/systemd | |
org.opencontainers.image.documentation=${{ github.event.repository.html_url }}/tree/main/Containerfiles/systemd/README.md | |
org.opencontainers.image.source=${{ github.event.repository.clone_url }} | |
org.opencontainers.image.version=${{ steps.tags.outputs.version }} | |
org.opencontainers.image.created=${{ steps.tags.outputs.build_date }} | |
org.opencontainers.image.revision=${{ github.sha }} | |
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }} | |
tags: | | |
quay.io/gotmax23/almalinux-systemd:9 | |
quay.io/gotmax23/almalinux-systemd:latest | |
quay.io/gotmax23/el-systemd:9 | |
quay.io/gotmax23/el-systemd:latest |