chore: refactor to create manifest before pushing

This commit is contained in:
bo0tzz 2025-02-18 19:51:42 +01:00
parent 70d08a2b2a
commit 8cdf78f8af
No known key found for this signature in database

View File

@ -367,7 +367,7 @@ jobs:
merge_server:
name: Merge & Push Server
runs-on: ubuntu-latest
if: ${{ needs.pre-job.outputs.should_run_server == 'true' && !github.event.pull_request.head.repo.fork }}
if: ${{ needs.pre-job.outputs.should_run_server == 'true' }}
env:
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/immich-server
DOCKER_REPO: altran1502/immich-server
@ -389,6 +389,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: docker/login-action@v3
with:
registry: ghcr.io
@ -419,11 +420,13 @@ jobs:
type=ref,event=tag,suffix=${{ matrix.suffix }}
type=raw,value=release,enable=${{ github.event_name == 'release' }},suffix=${{ matrix.suffix }}
- name: Create manifest list and push
- name: Create manifest
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
run: docker buildx imagetools create -t merged-manifest $(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
- name: Push
if: ${{ !github.event.pull_request.head.repo.fork }}
run: docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") merged-manifest
success-check-server:
name: Docker Build & Push Server Success