Skip to content

Commit 58a3918

Browse files
authored
chore: use matrix to cleanup untagged images
1 parent 897bf64 commit 58a3918

1 file changed

Lines changed: 6 additions & 22 deletions

File tree

.github/workflows/delete-unused-packages.yaml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,19 @@ name: Delete unused packages
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '5 * * * *'
6+
- cron: '*/5 * * * *'
77

88
jobs:
99
run:
10+
strategy:
11+
matrix:
12+
package-name: [platform-plugin-dev, platform-plugin-dev-base]
1013
runs-on: ubuntu-latest
1114
permissions:
1215
packages: write
1316

1417
steps:
15-
- name: Delete untagged platform-plugin-dev-base packages
16-
uses: actions/delete-package-versions@v4
17-
with:
18-
package-name: platform-plugin-dev-base
19-
package-type: container
20-
token: ${{ secrets.PAT_TOKEN_GITHUB }}
21-
min-versions-to-keep: 0
22-
delete-only-untagged-versions: "true"
23-
24-
# THIS DOES NOT WORK WITH MANY MANY MANY PACKAGES
25-
# - name: Delete untagged platform-plugin-dev packages
26-
# uses: actions/delete-package-versions@v4
27-
# with:
28-
# package-name: platform-plugin-dev
29-
# package-type: container
30-
# token: ${{ secrets.PAT_TOKEN_GITHUB }}
31-
# min-versions-to-keep: 0
32-
# delete-only-untagged-versions: "true"
33-
34-
- name: Delete untagged images of platform-plugin-dev
18+
- name: Delete untagged images of ${{ matrix.package-name }}
3519
uses: actions/github-script@v7
3620
with:
3721
github-token: ${{ secrets.PAT_TOKEN_GITHUB }}
@@ -49,5 +33,5 @@ jobs:
4933
}
5034
env:
5135
OWNER: orgs/FriendsOfShopware # or orgs/<org name>
52-
PACKAGE_NAME: platform-plugin-dev
36+
PACKAGE_NAME: ${{ matrix.package-name }}
5337
PER_PAGE: 100

0 commit comments

Comments
 (0)