Skip to content

Commit b1ab28f

Browse files
committed
perf: replace / characters in branch name on k8s test
1 parent e37f463 commit b1ab28f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/az_acr_test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
18+
- name: Configure branch name
19+
id: branch_name
20+
run: echo "GH_REF_NAME=${GITHUB_REF_NAME//\//-}" >> $GITHUB_OUTPUT
1821
- name: Set up Docker Buildx
1922
uses: docker/setup-buildx-action@v3
2023
- name: Log into registry
@@ -24,13 +27,13 @@ jobs:
2427
username: "${{ env.ACR_LOGIN_USERNAME }}"
2528
password: "${{ env.ACR_LOGIN_PASSWORD }}"
2629

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 }}
2831
uses: docker/build-push-action@v5
2932
with:
3033
cache-from: type=gha
3134
cache-to: type=gha,mode=max
3235
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 }}
3437
push: true
3538
build-args: |
3639
platform=linux/amd64

0 commit comments

Comments
 (0)