CI / test (push) Successful in 4m25s
Replaces the hand-written login/build/push/logout steps with ygg/actions/push-image@v2. Tags stay the same (X.Y.Z and latest, same image name); it adds OCI source/revision/created/version labels and logs in through a temporary DOCKER_CONFIG, so the registry token never touches the shared runner's ~/.docker. The job now exposes the version and digest as outputs, ready for a deploy job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1002 B
YAML
33 lines
1002 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
image:
|
|
runs-on: rocky-10
|
|
outputs:
|
|
version: ${{ steps.image.outputs.version }}
|
|
digest: ${{ steps.image.outputs.digest }}
|
|
steps:
|
|
- name: Check out source
|
|
uses: actions/checkout@v4
|
|
|
|
# The shared ygg action builds ./Dockerfile as
|
|
# git.app.ygg/mtps/tern-server, tagged with the version (v stripped)
|
|
# and latest, with OCI source/revision/created/version labels. It logs
|
|
# in through a temporary DOCKER_CONFIG, so the token never lands in the
|
|
# runner's ~/.docker, and builds with --progress=plain.
|
|
- name: Build and push image
|
|
id: image
|
|
uses: https://git.app.ygg/ygg/actions/push-image@v2
|
|
with:
|
|
registry-token: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Show image
|
|
env:
|
|
TAGS: ${{ steps.image.outputs.tags }}
|
|
DIGEST: ${{ steps.image.outputs.digest }}
|
|
run: printf 'tags: %s\ndigest: %s\n' "$TAGS" "$DIGEST"
|