File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 1515 permissions :
1616 contents : read
1717 packages : write
18+
19+ strategy :
20+ matrix :
21+ platform :
22+ - linux/amd64
23+ - linux/arm64
1824
1925 steps :
2026 - name : Checkout repository
@@ -30,20 +36,27 @@ jobs:
3036 username : ${{ github.actor }}
3137 password : ${{ secrets.GITHUB_TOKEN }}
3238
39+ - name : Extract platform suffix
40+ id : platform
41+ run : |
42+ platform_pair=${{ matrix.platform }}
43+ platform_suffix=${platform_pair#*/}
44+ echo "suffix=${platform_suffix}" >> $GITHUB_OUTPUT
45+
3346 - name : Extract metadata
3447 id : meta
3548 uses : docker/metadata-action@v5
3649 with :
3750 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3851 tags : |
39- type=sha,format=short
40- type=raw,value=latest,enable={{is_default_branch}}
52+ type=sha,format=short,suffix=-${{ steps.platform.outputs.suffix }}
53+ type=raw,value=latest-${{ steps.platform.outputs.suffix }} ,enable={{is_default_branch}}
4154
4255 - name : Build and push Docker image
4356 uses : docker/build-push-action@v5
4457 with :
4558 context : .
46- platforms : linux/amd64,linux/arm64
59+ platforms : ${{ matrix.platform }}
4760 push : true
4861 tags : ${{ steps.meta.outputs.tags }}
4962 labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments