Skip to content

Cleanup and Maintenance #39

Cleanup and Maintenance

Cleanup and Maintenance #39

name: 'Cleanup and Maintenance'
on:
workflow_dispatch:
schedule:
- cron: "19 23 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
cancel-in-progress: true
jobs:
cleanup:
name: 'Cleanup'
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
packages: write
steps:
- name: 'Delete workflow runs'
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 90
keep_minimum_runs: 2
- name: 'Pruning Untagged Images Older than 1 week'
uses: dataaxiom/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
package: 'backup'
delete-untagged: true
delete-ghost-images: true
delete-partial-images: true
older-than: 1 week
log-level: debug