File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 1- name : delete-image-tag.yml
1+ name : Delete PR Image On PR Close Action
2+
23on :
4+ pull_request_target :
5+ types : [closed]
6+
7+ permissions :
8+ pull-requests : write
9+ contents : write
10+ issues : write
311
412jobs :
13+ delete-quay-tag :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Install regctl
17+ run : |
18+ curl -LO https://github.com/regclient/regclient/releases/latest/download/regctl-linux-amd64
19+ chmod +x regctl-linux-amd64
20+ sudo mv regctl-linux-amd64 /usr/local/bin/regctl
21+ regctl version
22+
23+ - name : Configure regctl authentication
24+ run : |
25+ regctl registry login quay.io -u ${{ secrets.QUAY_USERNAME }} -p ${{ secrets.QUAY_PASSWORD }}
26+ echo "PR number: ${{ github.event.pull_request.number }}"
27+ echo "TAG_TO_DELETE=$(regctl tag ls quay.io/opendatahub/opendatahub-tests --include pr-${{ github.event.pull_request.number }})" >> $GITHUB_ENV
28+ - name : Delete Quay Tag
29+ if : env.TAG_TO_DELETE != ''
30+ run : |
31+ echo "Deleting tag '$TAG_TO_DELETE' from repository..."
32+ regctl tag rm quay.io/opendatahub/opendatahub-tests:pr-${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments