From eea9fd56b0a5282872749728d7024bc871179760 Mon Sep 17 00:00:00 2001 From: Marie Date: Tue, 26 Sep 2023 03:17:28 +0200 Subject: [PATCH 1/3] add(ci): clear-packages.yml --- .github/workflows/clear-untagged-packages.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/clear-untagged-packages.yml diff --git a/.github/workflows/clear-untagged-packages.yml b/.github/workflows/clear-untagged-packages.yml new file mode 100644 index 0000000000..1dfbaff097 --- /dev/null +++ b/.github/workflows/clear-untagged-packages.yml @@ -0,0 +1,15 @@ +name: Remove old package versions + +on: + workflow_dispatch: + +jobs: + remove-package-versions: + runs-on: ubuntu-latest + steps: + - uses: actions/delete-package-versions@v4 + with: + package-name: sharkey + package-type: container + min-versions-to-keep: 10 + delete-only-untagged-versions: 'true' From 12a324cff09837a3e766844b52f9ba1934f283b3 Mon Sep 17 00:00:00 2001 From: Marie Date: Tue, 26 Sep 2023 03:22:45 +0200 Subject: [PATCH 2/3] ci: add permissions to remove old versions --- .github/workflows/clear-untagged-packages.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/clear-untagged-packages.yml b/.github/workflows/clear-untagged-packages.yml index 1dfbaff097..c56499f773 100644 --- a/.github/workflows/clear-untagged-packages.yml +++ b/.github/workflows/clear-untagged-packages.yml @@ -6,6 +6,9 @@ on: jobs: remove-package-versions: runs-on: ubuntu-latest + permissions: + contents: read + packages: read|write steps: - uses: actions/delete-package-versions@v4 with: From 8484b00f7471f4fcca94f494fd95618768952741 Mon Sep 17 00:00:00 2001 From: Marie Date: Tue, 26 Sep 2023 03:25:56 +0200 Subject: [PATCH 3/3] fix(ci): fix permission error --- .github/workflows/clear-untagged-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear-untagged-packages.yml b/.github/workflows/clear-untagged-packages.yml index c56499f773..5f94d54bcb 100644 --- a/.github/workflows/clear-untagged-packages.yml +++ b/.github/workflows/clear-untagged-packages.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - packages: read|write + packages: write steps: - uses: actions/delete-package-versions@v4 with: