Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/delete-old-versions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Delete Old images and charts
on:
schedule:
- cron: '0 1 * * 1' # Every Monday at 01:00 UTC
workflow_dispatch:

jobs:
delete_old_packages:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Delete old aks-operator images
uses: actions/delete-package-versions@v4
with:
package-name: aks-operator
package-type: container
min-versions-to-keep: 30
token: ${{ secrets.GITHUB_TOKEN }}
owner: rancher

- name: Delete old rancher-aks-operator charts
uses: actions/delete-package-versions@v4
with:
package-name: rancher-aks-operator-chart/rancher-aks-operator
package-type: container
min-versions-to-keep: 7
token: ${{ secrets.GITHUB_TOKEN }}
owner: rancher

- name: Delete old rancher-aks-operator-crd charts
uses: actions/delete-package-versions@v4
with:
package-name: rancher-aks-operator-crd-chart/rancher-aks-operator-crd
package-type: container
min-versions-to-keep: 7
token: ${{ secrets.GITHUB_TOKEN }}
owner: rancher