name: Release on: push: tags: - "**" workflow_dispatch: inputs: tag: description: "Tag which should be released" type: string required: true jobs: push-arch-linux: runs-on: ubuntu-latest-amd64 steps: - id: version_extraction name: Extract git tag run: | VERSION="${{ inputs.tag || github.ref_name }}" VERSION="${VERSION#refs/*/}" echo "Version (raw): ${VERSION}" echo "Version (cleaned): ${VERSION/v/}" echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-tags: true ref: "${{ steps.version_extraction.outputs.version_raw }}" - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.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=${{ steps.version_extraction.outputs.version_cleaned }} docker buildx build \ --file Dockerfile.archlinux \ --push \ --tag git.cryptic.systems/volker.raschek/latex:${TAG}-archlinux \ . sync-to-hub-docker-io: needs: - push-arch-linux runs-on: ubuntu-latest steps: - id: version_extraction name: Extract git tag run: | VERSION="${{ inputs.tag || github.ref_name }}" VERSION="${VERSION#refs/*/}" echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT - name: Copy images to docker.io run: | TAG=${{ steps.version_extraction.outputs.version_cleaned }} apt-get update --yes apt-get install --yes skopeo for suffix in archlinux; 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/latex:${TAG}-${suffix} \ docker://docker.io/volkerraschek/latex:${TAG}-${suffix} done