Skip to content

Commit

Permalink
Merge pull request #22 from zippiehq/feat/add-depot-builds-on-AMD-ARM…
Browse files Browse the repository at this point in the history
…-arch

fix: explicitely push the image
  • Loading branch information
stskeeps authored Nov 28, 2024
2 parents b4cb05d + 2193213 commit 0dfe7fa
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/depot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ jobs:
depot build . \
--project hs0gfs4l0l \
--file Dockerfile \
--tag ${{ env.REGISTRY }}/${{ github.repository }}:${{ matrix.arch }} \
--tag ${{ env.REGISTRY }}/${{ github.repository }}:${{ matrix.arch }}-latest \
--platform linux/${{ matrix.arch }} \
--build-arg ARCH=${{ matrix.arch }} \
--cache-from type=gha,scope=build-${{ matrix.arch }} \
--cache-to type=gha,mode=max,scope=build-${{ matrix.arch }} \
--load
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
docker tag ${{ env.REGISTRY }}/${{ github.repository }}:${{ matrix.arch }} ${{ env.REGISTRY }}/${{ github.repository }}:${{ matrix.arch }}-latest
docker push ${{ env.REGISTRY }}/${{ github.repository }}:${{ matrix.arch }}-latest
fi
env:
Expand All @@ -67,16 +66,16 @@ jobs:
- name: Create and Push Docker Manifest
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker pull --platform linux/amd64 ${{ env.REGISTRY }}/${{ github.repository }}:amd64
docker pull --platform linux/arm64 ${{ env.REGISTRY }}/${{ github.repository }}:arm64
docker pull --platform linux/amd64 ${{ env.REGISTRY }}/${{ github.repository }}:amd64-latest
docker pull --platform linux/arm64 ${{ env.REGISTRY }}/${{ github.repository }}:arm64-latest
docker manifest create ${{ env.REGISTRY }}/${{ github.repository }}:latest \
--amend ${{ env.REGISTRY }}/${{ github.repository }}:amd64 \
--amend ${{ env.REGISTRY }}/${{ github.repository }}:arm64
--amend ${{ env.REGISTRY }}/${{ github.repository }}:amd64-latest \
--amend ${{ env.REGISTRY }}/${{ github.repository }}:arm64-latest
docker manifest annotate ${{ env.REGISTRY }}/${{ github.repository }}:latest ${{ env.REGISTRY }}/${{ github.repository }}:amd64 --arch amd64
docker manifest annotate ${{ env.REGISTRY }}/${{ github.repository }}:latest ${{ env.REGISTRY }}/${{ github.repository }}:arm64 --arch arm64
docker manifest annotate ${{ env.REGISTRY }}/${{ github.repository }}:latest ${{ env.REGISTRY }}/${{ github.repository }}:amd64-latest --arch amd64
docker manifest annotate ${{ env.REGISTRY }}/${{ github.repository }}:latest ${{ env.REGISTRY }}/${{ github.repository }}:arm64-latest --arch arm64
docker manifest push ${{ env.REGISTRY }}/${{ github.repository }}:latest
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKER_CLI_EXPERIMENTAL: enabled

0 comments on commit 0dfe7fa

Please sign in to comment.