Skip to content

Label Sync

Label Sync #6223

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Label Sync
permissions: { contents: read }
on:
schedule: [{cron: '0 * * * *'}]
workflow_dispatch:
inputs:
dry-run:
description: Dry Run
default: true
required: false
type: boolean
pull_request:
paths:
- .github/workflows/label-sync.yaml
- .github/labels.yaml
push:
branches: ["main", "master"]
paths:
- .github/workflows/label-sync.yaml
- .github/labels.yaml
jobs:
label-sync:
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: "${{ steps.app-token.outputs.token }}"
sparse-checkout: "${{ env.LABEL_SYNC_CONFIG_FILE }}"
- name: Sync Labels
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3
with:
dry-run: "${{ (inputs.dry-run || github.event_name == 'pull_request') == true }}"
token: "${{ steps.app-token.outputs.token }}"
config-file: .github/labels.yaml