Community Maintenance #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Community Maintenance | |
| on: | |
| schedule: | |
| - cron: '15 3 * * 0' | |
| workflow_dispatch: | |
| inputs: | |
| minimum_entries: | |
| description: 'Trim content files when they reach at least this many entries' | |
| required: false | |
| default: '100' | |
| type: string | |
| prune_mode: | |
| description: 'contributors_only trims canonical contributor files; all_json trims every JSON file in community/content' | |
| required: false | |
| default: 'contributors_only' | |
| type: choice | |
| options: | |
| - contributors_only | |
| - all_json | |
| minimum_available: | |
| description: 'Reset a backlog when available items are at or below this count' | |
| required: false | |
| default: '5' | |
| type: string | |
| full_reset: | |
| description: 'Reset every backlog item regardless of current availability' | |
| required: false | |
| default: false | |
| type: boolean | |
| dry_run: | |
| description: 'Run both maintenance workflows in reporting mode only' | |
| required: false | |
| type: boolean | |
| permissions: | |
| actions: read | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: community-maintenance | |
| cancel-in-progress: true | |
| jobs: | |
| thanos-content: | |
| if: github.repository == 'lingdojo/kana-dojo' | |
| uses: ./.github/workflows/thanos-community-content.yml | |
| with: | |
| minimum_entries: ${{ github.event.inputs.minimum_entries || '100' }} | |
| prune_mode: ${{ github.event.inputs.prune_mode || 'contributors_only' }} | |
| dry_run: ${{ github.event.inputs.dry_run == 'true' }} | |
| secrets: inherit | |
| reset-backlogs: | |
| if: github.repository == 'lingdojo/kana-dojo' | |
| needs: thanos-content | |
| uses: ./.github/workflows/auto-reset-community-backlog.yml | |
| with: | |
| minimum_available: ${{ github.event.inputs.minimum_available || '5' }} | |
| full_reset: ${{ github.event.inputs.full_reset == 'true' }} | |
| dry_run: ${{ github.event.inputs.dry_run == 'true' }} | |
| secrets: inherit |