Skip to content

Commit b094833

Browse files
committed
perf: differentiate between az_acr_push and az_acr_release
1 parent a29667f commit b094833

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed

.github/workflows/az_acr_push.yml

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: 'ACR: Docker Push'
22

33
on:
44
workflow_call:
5-
# inputs:
6-
# test_tag:
7-
# description: 'Create test tag'
8-
# default: 'false'
9-
# type: string
105

116
jobs:
127
az-acr-push:
@@ -42,19 +37,7 @@ jobs:
4237
- name: Configure branch name
4338
id: branch_name
4439
run: echo "GH_REF_NAME=$(echo ${{ github.ref_name }} | sed 's|/|-|g')" >> $GITHUB_OUTPUT
45-
46-
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}
47-
uses: docker/build-push-action@v5
48-
with:
49-
cache-from: type=gha
50-
cache-to: type=gha,mode=max
51-
file: 'Dockerfile'
52-
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:${{ matrix.platform}}
53-
push: true
54-
build-args: |
55-
platform=linux/${{ matrix.platform}}
56-
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
57-
40+
5841
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ steps.branch_name.outputs.GH_REF_NAME }}
5942
if: ${{ github.ref != github.repository.default_branch }}
6043
uses: docker/build-push-action@v5
@@ -68,19 +51,6 @@ jobs:
6851
platform=linux/${{ matrix.platform}}
6952
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
7053
71-
- name: Build & Push ${{ github.event.repository.name }}:latest
72-
uses: docker/build-push-action@v5
73-
if: ${{ matrix.platform == 'amd64' }}
74-
with:
75-
cache-from: type=gha
76-
cache-to: type=gha,mode=max
77-
file: 'Dockerfile'
78-
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:latest
79-
push: true
80-
build-args: |
81-
platform=linux/amd64
82-
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
83-
8454
- name: Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-gpu
8555
if: ${{ github.ref == github.repository.default_branch && hashFiles('gpu.Dockerflie') != '' }}
8656
uses: docker/build-push-action@v5

.github/workflows/az_acr_release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,30 @@ jobs:
2929

3030
- name: Set up Docker Buildx
3131
uses: docker/setup-buildx-action@v3
32+
33+
- name: Build & Push ${{ github.event.repository.name }}:amd64
34+
uses: docker/build-push-action@v5
35+
with:
36+
cache-from: type=gha
37+
cache-to: type=gha,mode=max
38+
file: 'Dockerfile'
39+
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:amd64
40+
push: true
41+
build-args: |
42+
platform=linux/amd64
43+
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
44+
45+
- name: Build & Push ${{ github.event.repository.name }}:arm64
46+
uses: docker/build-push-action@v5
47+
with:
48+
cache-from: type=gha
49+
cache-to: type=gha,mode=max
50+
file: 'Dockerfile'
51+
tags: ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:arm64
52+
push: true
53+
build-args: |
54+
platform=linux/arm64
55+
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
3256
3357
- name: Build & Push ${{ github.event.repository.name }}:${{ env.IMAGE_TAG }}
3458
uses: docker/build-push-action@v5

0 commit comments

Comments
 (0)