Skip to content

Commit 999be14

Browse files
committed
fix: update matrix.platform on arm64/v8
1 parent e207216 commit 999be14

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/az_acr_push.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,28 @@ jobs:
4646
id: branch_name
4747
run: echo "GH_REF_NAME=$(echo ${{ github.ref_name }} | sed 's|/|-|g')" >> $GITHUB_OUTPUT
4848

49-
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ steps.branch_name.outputs.GH_REF_NAME }}
49+
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform == 'arm64/v8' && 'arm64' || 'amd64' }}-${{ steps.branch_name.outputs.GH_REF_NAME }}
5050
if: ${{ github.ref_name != github.repository.default_branch }}
5151
uses: docker/build-push-action@v5
5252
with:
5353
push: true
5454
file: 'Dockerfile'
55-
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform}}-${{ steps.branch_name.outputs.GH_REF_NAME }}
55+
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform == 'arm64/v8' && 'arm64' || 'amd64' }}-${{ steps.branch_name.outputs.GH_REF_NAME }}
5656
cache-from: type=gha
5757
cache-to: type=gha,mode=max
5858
build-args: |
59-
platform=linux/${{ matrix.platform}}
59+
platform=linux/${{ matrix.platform == 'arm64/v8' && 'arm64' || 'amd64' }}
6060
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
6161
62-
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-gpu
63-
if: ${{ hashFiles('gpu.Dockerflie') != '' }}
62+
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform == 'arm64/v8' && 'arm64' || 'amd64' }}-gpu
63+
if: ${{ hashFiles('gpu.Dockerfile') != '' }}
6464
uses: docker/build-push-action@v5
6565
with:
6666
push: true
6767
file: 'gpu.Dockerfile'
68-
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform}}-gpu
68+
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform == 'arm64/v8' && 'arm64' || 'amd64' }}-gpu
6969
cache-from: type=gha
7070
cache-to: type=gha,mode=max
7171
build-args: |
72-
platform=linux/${{ matrix.platform}}
72+
platform=linux/${{ matrix.platform == 'arm64/v8' && 'arm64' || 'amd64' }}
7373
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/gpu.Dockerfile

0 commit comments

Comments
 (0)