CI / test (push) Successful in 41s
The v0.2.0 release log was 17k lines, ~12k of which were BuildKit's animated progress display repainting itself with cursor-movement escapes. --progress=plain emits one line per event instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
49 lines
1.7 KiB
YAML
49 lines
1.7 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
|
|
env:
|
|
DOCKER_BUILDKIT: '1'
|
|
run: |
|
|
IMAGE='${{ steps.meta.outputs.image }}'
|
|
VERSION='${{ steps.meta.outputs.version }}'
|
|
# --progress=plain: without it BuildKit renders an animated TTY
|
|
# progress display, repainting every step on each frame. In a log
|
|
# file that became ~15k lines of cursor-movement escapes for a
|
|
# build that only has a few hundred lines of real output.
|
|
docker build --progress=plain -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
|