ci: use fritzlab/build-image@v1
Build dns-webhook Image / build (push) Has been cancelled

Replaces inline docker login + metadata + build-push + tag-cleanup
with the shared build-image composite action. Standardizes on
CI_BOT_TOKEN (drops REGISTRY_PASSWORD).
This commit is contained in:
Donavan Fritz
2026-04-26 09:32:38 -05:00
parent 01e4b58c91
commit c5c5e72d24
+7 -35
View File
@@ -6,40 +6,12 @@ jobs:
build:
runs-on: fritzlab
steps:
- name: Check out repo
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Log in to Gitea registry
uses: docker/login-action@v3
- uses: https://code.fritzlab.net/fritzlab/build-image@v1
with:
registry: code.fritzlab.net
username: ci-bot
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: code.fritzlab.net/dns/webhook
tags: |
type=raw,value=${{ github.run_number }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
network: host
- name: Clean up old image tags
run: |
tea login add --name ci --url https://code.fritzlab.net --token '${{ secrets.CI_BOT_TOKEN }}' --no-version-check
tea api '/packages/dns?type=container' | jq -r '.[] | select(.name=="webhook") | select(.version | test("^[0-9]+$")) | .version' \
| sort -n | head -n -3 \
| while read tag; do
echo "deleting webhook:$tag"
tea api -X DELETE "/packages/dns/container/webhook/$tag"
done
image: code.fritzlab.net/dns/webhook
token: ${{ secrets.CI_BOT_TOKEN }}
org: dns
name: webhook
latest: 'false'