mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 02:47:56 +01:00
only check pr tags
This commit is contained in:
parent
53d1f80e8a
commit
fcf8544410
1 changed files with 10 additions and 7 deletions
17
.github/workflows/clean_repo.yml
vendored
17
.github/workflows/clean_repo.yml
vendored
|
|
@ -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,11 +54,14 @@ jobs:
|
|||
echo "${{ steps.open_prs.outputs.open_prs }}" | tr ' ' '\n' > open_prs
|
||||
for tag in ${{ steps.all_tags.outputs.tag_list }}
|
||||
do
|
||||
if (grep -w ${tag} open_prs > /dev/null)
|
||||
if [[ ${tag} =~ pr-.*]]
|
||||
then
|
||||
echo "PR is still open"
|
||||
else
|
||||
echo "${tag}" >> delete_tags
|
||||
if (grep -w ${tag} open_prs > /dev/null)
|
||||
then
|
||||
echo "PR is still open"
|
||||
else
|
||||
echo "${tag}" >> delete_tags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue