|
| 1 | +name: Housekeeping |
| 2 | +# checks are on all directories |
| 3 | + |
| 4 | +on: |
| 5 | + # Run daily at 7:00 |
| 6 | + schedule: |
| 7 | + - cron: '0 7 * * *' |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +# for security reasons the github actions are pinned to specific release versions |
| 11 | +jobs: |
| 12 | + chores: |
| 13 | + name: Tidy workflows |
| 14 | + runs-on: ubuntu-24.04 |
| 15 | + permissions: |
| 16 | + actions: write |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Delete stale workflow runs |
| 20 | + uses: Mattraks/delete-workflow-runs@v2.0.6 |
| 21 | + with: |
| 22 | + token: ${{ github.token }} |
| 23 | + repository: ${{ github.repository }} |
| 24 | + retain_days: 28 |
| 25 | + keep_minimum_runs: 10 |
| 26 | + |
| 27 | + - name: Delete unused workflows |
| 28 | + uses: otto-de/purge-deprecated-workflow-runs@v3.0.1 |
| 29 | + with: |
| 30 | + token: ${{ github.token }} |
| 31 | + |
| 32 | + link_checker: |
| 33 | + name: Link checker |
| 34 | + runs-on: ubuntu-24.04 |
| 35 | + steps: |
| 36 | + - name: Checkout markdown |
| 37 | + uses: actions/checkout@v4.2.0 |
| 38 | + |
| 39 | + - name: Link Checker |
| 40 | + uses: lycheeverse/lychee-action@v2.4.0 |
| 41 | + with: |
| 42 | + # skip the jekyll files under '_includes' directory, check all other directories |
| 43 | + args: >- |
| 44 | + --no-progress |
| 45 | + --max-retries 2 |
| 46 | + --exclude-path './_includes/*.html' |
| 47 | + '**/*.md' |
| 48 | + '*.md' |
| 49 | + fail: true |
| 50 | + env: |
| 51 | + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
| 52 | + |
| 53 | + stale: |
| 54 | + name: Tidy pull requests |
| 55 | + runs-on: ubuntu-24.04 |
| 56 | + permissions: |
| 57 | + pull-requests: write |
| 58 | + issues: write |
| 59 | + |
| 60 | + steps: |
| 61 | + - name: Tidy stale PRs and issues |
| 62 | + uses: actions/stale@v9 |
| 63 | + with: |
| 64 | + days-before-issue-stale: 182 |
| 65 | + days-before-issue-close: -1 |
| 66 | + stale-issue-message: 'This issue is stale because it has been open for 6 months with no activity.' |
| 67 | + stale-issue-label: stale |
| 68 | + remove-issue-stale-when-updated: true |
| 69 | + days-before-pr-stale: 42 |
| 70 | + days-before-pr-close: 7 |
| 71 | + stale-pr-message: 'This PR is stale because it has been open 42 days with no activity. Remove stale label, or add a comment, otherwise it will be closed in 7 days.' |
| 72 | + close-pr-message: 'This PR was closed because it has been stalled for 7 weeks with no activity.' |
0 commit comments