Adopt shared ci-actions for publishing
Some checks failed
Publish CLI / publish-docker (pull_request) Failing after 29s
Publish server Docker image / publish-docker (pull_request) Failing after 53s
Check / build (pull_request) Has been cancelled
E2E tests / build (pull_request) Has been cancelled

Replace inline publish step(s) with the canonical shell-only composite
actions in andras/ci-actions. Switches the publish jobs to the registered
'docker' runner.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andras Schmelczer 2026-06-06 15:00:39 +01:00
parent d99e249fa5
commit 339e17d27d
3 changed files with 21 additions and 86 deletions

View file

@ -9,7 +9,7 @@ on:
jobs:
publish-docker:
runs-on: ubuntu-docker
runs-on: docker
steps:
- name: Checkout repository
@ -17,35 +17,10 @@ jobs:
with:
fetch-depth: 0
- name: Extract registry hostname
id: registry
run: echo "host=$(echo '${{ github.server_url }}' | sed 's|https\?://||')" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into container registry
if: github.ref_type == 'tag'
uses: docker/login-action@v3
with:
registry: ${{ steps.registry.outputs.host }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.registry.outputs.host }}/${{ github.repository }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
- name: Build and publish server image
uses: http://forgejo:3000/andras/ci-actions/docker-publish@main
with:
context: sync-server
platforms: linux/amd64,linux/arm64
# Push only on tags (matches the previous workflow's behaviour).
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ steps.registry.outputs.host }}/${{ github.repository }}:buildcache
cache-to: type=registry,ref=${{ steps.registry.outputs.host }}/${{ github.repository }}:buildcache,mode=max
token: ${{ secrets.GITHUB_TOKEN }}