Skip to content

Cleanup repository

Cleanup repository #4

Workflow file for this run

name: 'Cleanup repository'
on:
schedule:
- cron: '0 0 1 * *'
workflow_call:
workflow_dispatch:
permissions:
issues: write
pull-requests: write
packages: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Cleanup stale PR's and issues
uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
stale-issue-label: 'no-issue-activity'
exempt-issue-labels: 'awaiting-approval,work-in-progress'
stale-pr-label: 'no-pr-activity'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
only-labels: 'awaiting-feedback,awaiting-answers'
days-before-stale: 60
days-before-close: 5
days-before-pr-close: -1
packages:
strategy:
matrix:
image: [opendora-api]
package: [open-dora-backstage-plugin]
runs-on: ubuntu-latest
steps:
- name: Cleanup old images for container ${{ matrix.image }}
uses: actions/delete-package-versions@v5
with:
package-name: 'opendora/${{ matrix.image }}'
package-type: container
min-versions-to-keep: 3
delete-only-untagged-versions: 'true'
- name: Cleanup old packages for npm ${{ matrix.package }}
uses: actions/delete-package-versions@v5
with:
package-name: '${{ matrix.package }}'
package-type: npm
min-versions-to-keep: 3
delete-only-untagged-versions: 'true'