@@ -2,11 +2,6 @@ name: 'ACR: Docker Push'
2
2
3
3
on :
4
4
workflow_call :
5
- # inputs:
6
- # test_tag:
7
- # description: 'Create test tag'
8
- # default: 'false'
9
- # type: string
10
5
11
6
jobs :
12
7
az-acr-push :
42
37
- name : Configure branch name
43
38
id : branch_name
44
39
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
+
58
41
- name : Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ steps.branch_name.outputs.GH_REF_NAME }}
59
42
if : ${{ github.ref != github.repository.default_branch }}
60
43
uses : docker/build-push-action@v5
68
51
platform=linux/${{ matrix.platform}}
69
52
label=dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
70
53
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
-
84
54
- name : Build & Push ${{ github.event.repository.name }}:${{ matrix.platform}}-gpu
85
55
if : ${{ github.ref == github.repository.default_branch && hashFiles('gpu.Dockerflie') != '' }}
86
56
uses : docker/build-push-action@v5
0 commit comments