Skip to content

Commit

Permalink
chore: refactor to create manifest before pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
bo0tzz committed Feb 18, 2025
1 parent 70d08a2 commit 8cdf78f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8cdf78f

Please sign in to comment.