Skip to content

Commit

Permalink
fix: adjust ghcrCleanup workflow triggers and properly set package names
Browse files Browse the repository at this point in the history
  • Loading branch information
alismx committed Jan 3, 2024
1 parent 047cbb0 commit c1d681a
Showing 1 changed file with 39 additions and 30 deletions.
69 changes: 39 additions & 30 deletions .github/workflows/ghcrCleanup.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,57 @@
name: Delete old container images

on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- alis/ghcr_clean_fix
# schedule:
# - cron: "0 0 * * *"

jobs:
clean_ghcr:
name: Delete untagged container images
runs-on: ubuntu-latest
steps:
# backend, cypress, database, frontend, frontend-lighthouse, nginx
# - uses: actions/delete-package-versions@v4
# with:
# package-name: 'prime-simplereport/backend'
# package-type: 'container'
# min-versions-to-keep: 10
# delete-only-untagged-versions: 'true'
# - uses: actions/delete-package-versions@v4
# with:
# package-name: 'prime-simplereport/cypress'
# package-type: 'container'
# min-versions-to-keep: 10
# delete-only-untagged-versions: 'true'
# - uses: actions/delete-package-versions@v4
# with:
# package-name: 'prime-simplereport/database'
# package-type: 'container'
# min-versions-to-keep: 10
# delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: 'backend'
with:
package-name: 'prime-simplereport/db'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
# - uses: actions/delete-package-versions@v4
# with:
# package-name: 'prime-simplereport/frontend'
# package-type: 'container'
# min-versions-to-keep: 10
# delete-only-untagged-versions: 'true'
# - uses: actions/delete-package-versions@v4
# with:
# package-name: 'prime-simplereport/frontend-lighthouse'
# package-type: 'container'
# min-versions-to-keep: 10
# delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: 'cypress'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: 'database'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: 'frontend'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: 'frontend-lighthouse'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'
- uses: actions/delete-package-versions@v4
with:
package-name: 'nginx'
with:
package-name: 'prime-simplereport/nginx'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'

0 comments on commit c1d681a

Please sign in to comment.