File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,17 @@ jobs:
1616 steps :
1717 - name : Sanitize branch name to match image tag
1818 id : sanitize
19+ env :
20+ PR_REF : ${{ github.event.pull_request.head.ref }}
1921 run : |
20- BRANCH="${{ github.event.pull_request.head.ref }}"
21- TAG="${BRANCH//\//_}"
22+ TAG="${PR_REF//\//_}"
2223 echo "tag=$TAG" >> "$GITHUB_OUTPUT"
2324
2425 - name : Delete image by tag from GHCR
26+ env :
27+ TAG : ${{ steps.sanitize.outputs.tag }}
2528 run : |
2629 gh api "orgs/DataDog/packages/container/dd-trace-dotnet%2Fdd-trace-dotnet/versions" \
27- --jq ".[] | select(.metadata.container.tags[]? == \"${{ steps.sanitize.outputs.tag } }\") | .id" \
30+ --jq ".[] | select(.metadata.container.tags[]? == \"${TAG }\") | .id" \
2831 | xargs -r -I {} gh api "orgs/DataDog/packages/container/dd-trace-dotnet%2Fdd-trace-dotnet/versions/{}" -X DELETE
29- echo "Deleted version with tag: ${{ steps.sanitize.outputs.tag }}"
32+ echo "Deleted version with tag: ${TAG}"
You can’t perform that action at this time.
0 commit comments