| 1 | name: GitHub community setup |
| 2 | |
| 3 | # Sets up the GitHub mirror's community side as the account that owns MIRROR_TOKEN, so it |
| 4 | # shows Codician rather than a person: labels, Discussions with the welcome post, and the |
| 5 | # pinned roadmap issue (scripts/github-community.mjs). Only creates what is missing, so |
| 6 | # running it again changes nothing. Run it by hand from the Actions tab. |
| 7 | on: |
| 8 | workflow_dispatch: |
| 9 | inputs: |
| 10 | dry_run: |
| 11 | description: Only report what would change |
| 12 | type: boolean |
| 13 | default: false |
| 14 | |
| 15 | permissions: |
| 16 | contents: read |
| 17 | |
| 18 | jobs: |
| 19 | setup: |
| 20 | name: Labels, welcome discussion and roadmap issue |
| 21 | if: ${{ github.server_url != 'https://github.com' && github.repository == 'codician/diffinery' }} |
| 22 | runs-on: ubuntu-latest |
| 23 | environment: github-mirror |
| 24 | timeout-minutes: 5 |
| 25 | steps: |
| 26 | - uses: actions/checkout@v4 |
| 27 | - run: node scripts/github-community.mjs ${{ inputs.dry_run && '--dry-run' || '' }} |
| 28 | env: |
| 29 | MIRROR_TOKEN: ${{ secrets.MIRROR_TOKEN }} |