File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 15
15
steps :
16
16
- name : Checkout repository
17
17
uses : actions/checkout@v4
18
+ - name : Configure branch name
19
+ id : branch_name
20
+ run : echo "GH_REF_NAME=${GITHUB_REF_NAME//\//-}" >> $GITHUB_OUTPUT
18
21
- name : Set up Docker Buildx
19
22
uses : docker/setup-buildx-action@v3
20
23
- name : Log into registry
@@ -24,13 +27,13 @@ jobs:
24
27
username : " ${{ env.ACR_LOGIN_USERNAME }}"
25
28
password : " ${{ env.ACR_LOGIN_PASSWORD }}"
26
29
27
- - name : Build & Push ${{ github.event.repository.name }}:test-${{ github.head_ref }}
30
+ - name : Build & Push ${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}
28
31
uses : docker/build-push-action@v5
29
32
with :
30
33
cache-from : type=gha
31
34
cache-to : type=gha,mode=max
32
35
file : ' dev.Dockerfile'
33
- tags : ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ github.head_ref }}
36
+ tags : ${{ env.AZURE_CONTAINER_REGISTRY }}/${{ github.event.repository.name }}:test-${{ steps.branch_name.outputs.GH_REF_NAME }}
34
37
push : true
35
38
build-args : |
36
39
platform=linux/amd64
You can’t perform that action at this time.
0 commit comments