Skip to content

Commit

Permalink
Prevent image override again on release
Browse files Browse the repository at this point in the history
  • Loading branch information
galeaspablo committed Nov 20, 2024
1 parent e0b025d commit 21ae22b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ jobs:
include:
- platform: linux/amd64
runner_group: large_amd64
platform_tag: amd64
- platform: linux/arm64
runner_group: large_arm64
platform_tag: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v4
Expand All @@ -45,19 +47,20 @@ jobs:
with:
context: ./build/
file: ./build/Dockerfile
push: false
pull: false
push: true
platforms: ${{ matrix.platform }}
tags: ambarltd/emulator:${{ github.event.release.tag_name }},ambarltd/emulator:latest
tags: ambarltd/emulator:${{ github.event.release.tag_name }}-${{ matrix.platform_tag }}
labels: ${{ steps.meta.outputs.labels }}

- name: Push Docker image for ${{ matrix.platform }}
run: |
docker manifest create ambarltd/emulator:${{ github.event.release.tag_name }} \
--amend ambarltd/emulator:${{ github.event.release.tag_name }}
--amend ambarltd/emulator:${{ github.event.release.tag_name }}-${{ matrix.platform_tag }} || \
docker manifest create ambarltd/emulator:${{ github.event.release.tag_name }}
docker manifest push ambarltd/emulator:${{ github.event.release.tag_name }}
docker manifest create ambarltd/emulator:${{ github.event.release.tag_name }} \
--amend ambarltd/emulator:latest

docker manifest push ambarltd/emulator:latest
docker manifest create ambarltd/emulator:latest \
--amend ambarltd/emulator:${{ github.event.release.tag_name }}-${{ matrix.platform_tag }} || \
docker manifest create ambarltd/emulator:latest
docker manifest push ambarltd/emulator:latest

0 comments on commit 21ae22b

Please sign in to comment.