fix(ci):split build&push phase
All checks were successful
Build and Push API / build-api (push) Successful in 5m54s
Build and Push Dashboard / build-dashboard (push) Successful in 14m30s
Build and Push Worker / build-worker (push) Successful in 1h18m47s

This commit is contained in:
2026-04-09 10:53:16 +02:00
parent 9a56e76dc1
commit a3ba6e16e4

View File

@@ -14,11 +14,17 @@ env:
jobs:
build-worker:
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
- name: Log in to registry
if: github.event_name != 'pull_request'
@@ -38,18 +44,24 @@ jobs:
type=sha,prefix=sha-,format=short
type=semver,pattern={{version}}
- name: Build and push
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
file: apps/worker/Dockerfile
target: runner
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.OWNER }}/openpanel-worker:buildcache
cache-to: ${{ github.event_name != 'pull_request' && format('type=registry,ref={0}/{1}/openpanel-worker:buildcache,mode=min,image-manifest=true,oci-mediatypes=true', env.REGISTRY, env.OWNER) || '' }}
build-args: |-
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres
- name: Push image
if: github.event_name != 'pull_request'
run: |-
while IFS= read -r tag; do
[ -n "$tag" ] && docker push "$tag"
done <<< "${{ steps.meta.outputs.tags }}"