Delete old container images #595
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete old container images | |
on: | |
schedule: | |
- cron: "0 0 * * *" # every day | |
jobs: | |
clean_ghcr: | |
name: Delete container images | |
runs-on: ubuntu-latest | |
steps: | |
# backend, cypress, database, frontend, frontend-lighthouse, nginx | |
- name: Delete backend container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/backend' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' | |
- name: Sleep for 45 seconds because of secondary rate limit | |
run: sleep 45 | |
shell: bash | |
- name: Delete cypress container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/cypress' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' | |
- name: Sleep for 45 seconds because of secondary rate limit | |
run: sleep 45 | |
shell: bash | |
- name: Delete database container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/database' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' | |
- name: Sleep for 45 seconds because of secondary rate limit | |
run: sleep 45 | |
shell: bash | |
- name: Delete db container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/db' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' | |
- name: Sleep for 45 seconds because of secondary rate limit | |
run: sleep 45 | |
shell: bash | |
- name: Delete frontend container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/frontend' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' | |
- name: Sleep for 45 seconds because of secondary rate limit | |
run: sleep 45 | |
shell: bash | |
- name: Delete frontend-lighthouse container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/frontend-lighthouse' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' | |
- name: Sleep for 45 seconds because of secondary rate limit | |
run: sleep 45 | |
shell: bash | |
- name: Delete nginx container images | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'prime-simplereport/nginx' | |
package-type: 'container' | |
min-versions-to-keep: 100 | |
delete-only-untagged-versions: 'false' |