Compare commits

...

1 Commits

Author SHA1 Message Date
fallenbagel
f3e8cc3546 ci: add a job to merge and create multi-arch image
This has to be done now that arm64 and amd64 runs as two seperate jobs. Otherwise, whichever
finishes the last would override the other one when pushed
2025-01-18 19:29:04 +08:00

View File

@@ -75,23 +75,47 @@ jobs:
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env: env:
OWNER: ${{ github.repository_owner }} OWNER: ${{ github.repository_owner }}
- name: Build and push - name: Build architecture specific images
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
# platforms: linux/amd64,linux/arm64 # platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.platform }} platforms: ${{ matrix.platform }}
push: true # dont push until merged
push: false
build-args: | build-args: |
COMMIT_TAG=${{ github.sha }} COMMIT_TAG=${{ github.sha }}
tags: | tags: |
fallenbagel/jellyseerr:develop fallenbagel/jellyseerr:develop-${{ matrix.platform }}
ghcr.io/${{ env.OWNER_LC }}/jellyseerr:develop ghcr.io/${{ env.OWNER_LC }}/jellyseerr:develop-${{ matrix.platform }}
cache-from: type=gha,scope=${{ matrix.platform }} cache-from: type=gha,scope=${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=${{ matrix.platform }} cache-to: type=gha,mode=max,scope=${{ matrix.platform }}
provenance: false provenance: false
create_manifest:
name: Create Multi-Architecture Image
needs: build_and_push
runs-on: ubuntu-24.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create and Push Multi-Architecture Image
uses: docker/build-push-action@v5
with:
images: |
fallenbagel/jellyseerr:develop-linux-amd64
fallenbagel/jellyseerr:develop-linux-arm64
ghcr.io/${{ github.repository_owner }}/jellyseerr:develop-linux-amd64
ghcr.io/${{ github.repository_owner }}/jellyseerr:develop-linux-arm64
target: |
fallenbagel/jellyseerr:develop
ghcr.io/${{ github.repository_owner }}/jellyseerr:develop
- name: Inspect Manifest
run: |
docker buildx imagetools inspect fallenbagel/jellyseerr:develop
docker buildx imagetools inspect ghcr.io/${{ github.repository_owner }}/jellyseerr:develop
discord: discord:
name: Send Discord Notification name: Send Discord Notification
needs: build_and_push needs: build_and_push