Markus Pesch c232c282db
All checks were successful
Build / build-arch-linux (push) Successful in 12m1s
Build / build-rocky-linux-8 (push) Successful in 8m49s
Release / push-arch-linux (push) Successful in 18m43s
Release / push-rocky-linux-8 (push) Successful in 13m26s
Release / sync-to-hub-docker-io (push) Successful in 1m59s
fix(ci): use container image tag from git tag
2025-05-08 15:44:14 +02:00

77 lines
2.3 KiB
YAML

name: Release
on:
push:
tags:
- "**"
jobs:
push-arch-linux:
runs-on: ubuntu-latest-amd64
steps:
- uses: actions/checkout@v4.2.2
- uses: docker/setup-qemu-action@v3.6.0
- uses: docker/setup-buildx-action@v3.10.0
- uses: docker/login-action@v3.4.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Build and push image
run: |
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
docker buildx build \
--file Dockerfile.archlinux \
--push \
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-archlinux \
.
push-rocky-linux-8:
runs-on: ubuntu-latest-amd64
steps:
- uses: actions/checkout@v4.2.2
- uses: docker/setup-qemu-action@v3.6.0
- uses: docker/setup-buildx-action@v3.10.0
- uses: docker/login-action@v3.4.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- name: Build and push image
run: |
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
docker buildx build \
--file Dockerfile.rockylinux8 \
--push \
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-8 \
.
sync-to-hub-docker-io:
needs:
- push-arch-linux
- push-rocky-linux-8
runs-on: ubuntu-latest
steps:
- name: Copy images to docker.io
run: |
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
apt-get update --yes
apt-get install --yes skopeo
for suffix in archlinux rockylinux-8; do
skopeo copy \
--all \
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
--dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
--src-username volker.raschek \
docker://git.cryptic.systems/volker.raschek/ansible:${TAG}-${suffix} \
docker://docker.io/volkerraschek/ansible:${TAG}-${suffix}
done