Skip to content

Commit 96bc0ff

Browse files
committed
fix: configure delete tag name
1 parent a210b42 commit 96bc0ff

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/workflows/az_acr_release.yml

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

3030
- name: Set up Docker Buildx
3131
uses: docker/setup-buildx-action@v3
32-
with:
33-
driver: docker
3432

3533
- name: Build & Push ${{ github.event.repository.name }}:${{ env.IMAGE_TAG }}
3634
uses: docker/build-push-action@v5

.github/workflows/gh_delete_branch.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
image_tag: "test-${{ github.event.pull_request.head.ref }}"
1212

1313
az-acr-delete:
14-
name: 'Azure: Delete Branch Images'
14+
name: 'ACR: Delete Branch Images'
1515
runs-on: ubuntu-latest
1616
environment: dev
1717
env:
@@ -33,9 +33,10 @@ jobs:
3333
uses: azure/cli@v2
3434
with:
3535
inlineScript: |
36+
GH_REF_NAME=$(echo ${{ github.event.pull_request.head.ref }} | sed 's|/|-|g')
3637
az acr repository delete \
3738
--name ${{ env.AZURE_CONTAINER_REGISTRY }} \
38-
--image ${{ github.event.repository.name }}:${{ matrix.platform}}-${{ github.head_ref }} \
39+
--image ${{ github.event.repository.name }}:${{ matrix.platform}}-${GH_REF_NAME} \
3940
--yes
4041
4142
gh-delete-branch:
@@ -47,11 +48,6 @@ jobs:
4748
with:
4849
token: ${{ secrets.GH_TOKEN }}
4950

50-
- name: Dump GitHub context
51-
env:
52-
GITHUB_CONTEXT: ${{ toJSON(github) }}
53-
run: echo "$GITHUB_CONTEXT"
54-
5551
- name: Delete Branch
5652
shell: bash
5753
run: git push origin --delete ${{ github.head_ref }}

0 commit comments

Comments
 (0)