Skip to content

Sync Labels to Repositories #1

Sync Labels to Repositories

Sync Labels to Repositories #1

Workflow file for this run

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 }}"