Archived
83 lines
2.6 KiB
YAML
83 lines
2.6 KiB
YAML
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@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
|
- uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
|
|
|
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # 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=${{ 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 |