Sync Labels to Repositories #1
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: Sync Labels to Other Repositories | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| repositories: | |
| description: 'Comma-separated list of target repositories (org/repo)' | |
| required: true | |
| default: 'jetbrains-eval-lab/repo1' | |
| jobs: | |
| sync-labels: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| repo: ${{ fromJson(inputs.repositories) }} | |
| steps: | |
| - name: Checkout labels repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install github-label-sync | |
| run: npm install -g github-label-sync | |
| - name: Sync labels to target repository | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PAT_LABEL_SYNC }} | |
| run: | | |
| echo "Syncing labels to ${{ matrix.repo }}" | |
| github-label-sync \ | |
| --access-token "$GITHUB_TOKEN" \ | |
| --labels .github/labels.json \ | |
| "${{ matrix.repo }}" |