Files
tern-server/.gitea/workflows/release.yml
T
Mateusz PstruchaandClaude Opus 5 a4401936a0
CI / test (push) Failing after 1m17s
Target the rocky-10 runner and its proven action conventions
Match the setup already working on that runner: setup-* actions to
provision toolchains rather than host-installed tooling, and the
automatic GITHUB_TOKEN. Registry push keeps a dedicated REGISTRY_TOKEN,
since the automatic token's scope doesn't reliably cover packages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 20:12:29 +02:00

43 lines
1.4 KiB
YAML

name: Release
on:
push:
tags: ['v*']
jobs:
image:
runs-on: rocky-10
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Derive registry and version
id: meta
run: |
# gitea.server_url is the web root, e.g. https://git.app.ygg — the
# container registry lives on that same host, so there's no
# hostname to hardcode or keep in sync.
REGISTRY="$(echo '${{ gitea.server_url }}' | sed -E 's#^https?://##')"
VERSION="${GITHUB_REF_NAME#v}"
echo "registry=$REGISTRY" >> "$GITHUB_OUTPUT"
echo "image=$REGISTRY/${{ gitea.repository }}" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Log in to container registry
run: |
echo '${{ secrets.REGISTRY_TOKEN }}' \
| docker login '${{ steps.meta.outputs.registry }}' \
-u '${{ gitea.actor }}' --password-stdin
- name: Build and push image
run: |
IMAGE='${{ steps.meta.outputs.image }}'
VERSION='${{ steps.meta.outputs.version }}'
docker build -t "$IMAGE:$VERSION" -t "$IMAGE:latest" .
docker push "$IMAGE:$VERSION"
docker push "$IMAGE:latest"
- name: Log out
if: always()
run: docker logout '${{ steps.meta.outputs.registry }}' || true