Skip to content

Commit

Permalink
Add GitHub Action to delete old packages
Browse files Browse the repository at this point in the history
  • Loading branch information
aguslr committed May 22, 2024
1 parent bd602d2 commit 2bd9fdd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/clean-up.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Delete old packages

on:
schedule:
- cron: '20 8 * * *' # 8:20am everyday
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

env:
PKG_NAME: ${{ github.event.repository.name }}

jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Delete old packages
uses: actions/delete-package-versions@v5
with:
package-name: ${{ env.PKG_NAME }}
package-type: 'container'
min-versions-to-keep: 20

0 comments on commit 2bd9fdd

Please sign in to comment.