Skip to content

Add script to sync labels #15

Add script to sync labels

Add script to sync labels #15

Workflow file for this run

name: Sync labels
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- "main"
- "label-sync"
paths:
- "package.json"
- "eng/common/labels.yml"
- "eng/common/scripts/sync-labels.ts"
- ".github/workflows/sync-labels.yml"
pull_request:
branches:
- "main"
paths:
- "package.json"
- "eng/common/labels.yml"
- "eng/common/scripts/sync-labels.ts"
- ".github/workflows/sync-labels.yml"
workflow_dispatch: {}
permissions:
issues: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm install
name: Install dependencies
- run: |
if [[ ${{ github.event_name }} == "pull_request" ]]; then
echo "Pull request, checking CONTRIBUTING sync."
pnpm sync-labels
else
echo "CI, checking github labels are up to date."
pnpm sync-labels --update-github-labels --dry-run
fi
name: Sync labels
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}