Skip to content

Commit

Permalink
scheduled image cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanmars committed May 13, 2024
1 parent 8961c7c commit 3b9abb8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,13 @@ jobs:
tags: ${{ steps.gentags.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.labels }}

delete-untagged-images:
name: delete-untagged-images
runs-on: ubuntu-latest
needs: [image-build-single-arch,image-build-multi-arch]
steps:
- uses: dataaxiom/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

17 changes: 17 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: daily-cleanup
run-name: daily-cleanup
on:
# every day at 01:30am
schedule:
- cron: '30 1 * * *'
# or manually
workflow_dispatch:

jobs:
delete-untagged-images:
name: Delete Untagged Images
runs-on: ubuntu-latest
steps:
- uses: dataaxiom/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN}}

0 comments on commit 3b9abb8

Please sign in to comment.