Archived
Lint Markdown files / markdown-lint (push) Successful in 52s
Update Docker Hub Description / update-description-on-hub-docker-io (push) Successful in 16s
Build / build-arch-linux (push) Successful in 5m9s
Release / push-arch-linux (push) Successful in 7m44s
Release / sync-to-hub-docker-io (push) Successful in 8m0s
Introduce a cron-triggered auto-release workflow that runs on the second Sunday of each month, creating a time-based tag in YYYY-MM format and dispatching the release workflow. The release workflow is extended with a workflow_dispatch trigger accepting a tag input, so it can be invoked both by tag pushes and programmatically by the auto-release. Version extraction is unified via a dedicated step using `inputs.tag || github.ref_name` in both jobs. Co-authored-by: Copilot <copilot@github.com>
83 lines
2.4 KiB
YAML
83 lines
2.4 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@v4.2.2
|
|
with:
|
|
fetch-tags: true
|
|
ref: "${{ steps.version_extraction.outputs.version_raw }}"
|
|
|
|
- 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=${{ 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 |