Skip to content

Cleanup and Maintainance #148

Cleanup and Maintainance

Cleanup and Maintainance #148

name: 'Cleanup and Maintainance'
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:
dockercleanup:
name: 'Pruning Untagged Images'
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: 'Older than 1 week'
uses: dataaxiom/[email protected]
with:
dry-run: true
token: ${{ secrets.GITHUB_TOKEN }}
delete-untagged: true
delete-ghost-images: true
delete-partial-images: true
# older-than: 5
log-level: debug
stale:
runs-on: ubuntu-latest
name: 'Close Stale PRs'
permissions:
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-stale: 60
days-before-close: 10
workflows:
runs-on: ubuntu-latest
name: 'Cleanup old workflow runs'
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