1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

only check pr tags

This commit is contained in:
Jason N. 2024-03-27 16:16:37 -04:00
parent 53d1f80e8a
commit fcf8544410

View file

@ -7,10 +7,10 @@ on:
jobs:
delete_untagged:
name: Delete untagged packages
name: Delete Untagged Packages
runs-on: ubuntu-latest
steps:
- name: Dlete Untagged packages
- name: Delete Untagged Packages
uses: Chizkiyahu/delete-untagged-ghcr-action@v3
with:
token: ${{ secrets.PACKAGE_DELETER }}
@ -19,7 +19,7 @@ jobs:
untagged_only: true
owner_type: user
delete_old_pr:
name: Delete untagged packages
name: Delete Old PR Packages
runs-on: ubuntu-latest
permissions:
packages: read
@ -54,12 +54,15 @@ jobs:
echo "${{ steps.open_prs.outputs.open_prs }}" | tr ' ' '\n' > open_prs
for tag in ${{ steps.all_tags.outputs.tag_list }}
do
if [[ ${tag} =~ pr-.*]]
then
if (grep -w ${tag} open_prs > /dev/null)
then
echo "PR is still open"
else
echo "${tag}" >> delete_tags
fi
fi
done
echo "Tags to delete:"