Delete untagged images (#151)

This change to the pipline deletes untagged / overwritten tags once a
week to keep the memory consumption in the GH registry reasonable.
This commit is contained in:
Philipp Horstenkamp 2023-09-25 20:28:49 +02:00 committed by GitHub
parent 5e716801c0
commit 9cc0654f56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 11 deletions

View File

@ -1,11 +0,0 @@
name: Branch Deleted
on: delete
jobs:
delete:
if: github.event.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
- name: Clean up
run: |
echo "Clean up for branch ${{ github.event.ref }}"
# uses: bots-house/ghcr-delete-image-action@v1.1.0

18
.github/workflows/maintenance.yaml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Auto Maintenance Cycle
on:
schedule:
- cron: 30 7 * * 1
jobs:
delete_all_untagged:
runs-on: ubuntu-latest
strategy:
matrix:
name: [ingest, data-transformation, web-server]
steps:
- name: purge packages
uses: dylanratcliffe/delete-untagged-containers@main
with:
package_name: ${{ github.event.repository.name }}/${{ matrix.name }}
token: ${{ secrets.GITHUB_TOKEN }}