Skip to content

Commit 9d3d1b5

Browse files
committed
Cleanup step
1 parent 743daba commit 9d3d1b5

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/build_test_push.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
with:
6666
registry: ghcr.io
6767
username: ${{ github.actor }}
68-
password: ${{ secrets.GITHUB_TOKEN }}
68+
password: ${{ secrets.PASSWORD }}
6969

7070
- name: Create dummy .env for CI
7171
run: |
@@ -92,4 +92,19 @@ jobs:
9292
*.platform=linux/amd64
9393
*.cache-from=type=gha
9494
*.cache-to=type=gha,mode=max
95-
deepvisionxplain.tags=${{ steps.meta.outputs.tags }}
95+
deepvisionxplain.tags=${{ steps.meta.outputs.tags }}
96+
97+
cleanup-old-packages:
98+
needs: build-and-push
99+
runs-on: ubuntu-latest
100+
if: github.event_name == 'push'
101+
102+
steps:
103+
- name: Delete old packages
104+
uses: actions/delete-package-versions@v4
105+
with:
106+
package-name: 'deepvisionxplain'
107+
package-type: 'container'
108+
min-versions-to-keep: 3
109+
delete-only-untagged-versions: false
110+
token: ${{ secrets.PASSWORD }}

0 commit comments

Comments
 (0)