Skip to content

Sync GitHub Labels #468

Sync GitHub Labels

Sync GitHub Labels #468

Workflow file for this run

# This workflow runs the sync-repo-labels.sh script periodically.
name: Sync GitHub Labels
on:
# Run every day at 10:00 (until #2485 is fixed).
schedule:
- cron: '0 10 * * *'
# Run when a PR that touched the labels is closed (closed includes merges).
pull_request:
types: [closed]
paths:
- "site/_data/github-labels.yaml"
# Allow manual runs
workflow_dispatch:
jobs:
sync:
name: Sync Labels
runs-on: ubuntu-latest
steps:
# Note, we check out main. We don't want un-merged PRs to whack
# labels globally.
- name: Check out main
uses: actions/checkout@v3
with:
ref: main
# We need this token in a file so the syncer can consume it from
# within the Docker container.
- name: Export the GitHub token
run: 'echo "${{ secrets.PROJECTCONTOUR_BOT_GITHUB_TOKEN }}" > github-token'
- name: Run the label syncer
run: 'TOKEN="github-token" ./hack/release/sync-repo-labels.sh'