Skip to content

Commit

Permalink
Separating image cleanup to its own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Feb 17, 2024
1 parent b2161a5 commit 5342b9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/docker-image-cleaup-old-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Cleanup old Docker Images from GitHub Container Registry

on:
workflow_dispatch: # Creates button in web UI to run the workflow manually, shouldn't be needed
schedule:
- cron: '0 0 * * *' # Run at 00:00 UTC every day

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Delete old untagged packages
uses: actions/[email protected]
with:
package-name: sourcegraph/bridge-repo-converter
package-type: container
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'
token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 0 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Delete old untagged packages
uses: actions/[email protected]
with:
package-name: sourcegraph/bridge-repo-converter
package-type: container
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5342b9e

Please sign in to comment.