Sync labels #1171
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 | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Run at the end of the day (most likely UTC) | |
| - cron: "0 0 * * *" | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - develop | |
| paths: | |
| - '.github/workflows/label-sync.yml' | |
| - '.github/labels.yml' | |
| jobs: | |
| labels: | |
| # We use ubuntu as the image, as it is typically faster and cheaper (on private repos). | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: .github/labels.yml | |
| - uses: EndBug/label-sync@v2 | |
| with: | |
| config-file: | | |
| https://raw.githubusercontent.com/chocolatey/.github/main/.github/labels.yml | |
| .github/labels.yml | |
| request-token: ${{ secrets.SYNC_TOKEN }} # Used when getting the config files. | |
| delete-other-labels: true # After initial run, and verification change this to true | |
| dry-run: false | |
| token: ${{ secrets.SYNC_TOKEN }} # Used when updating the labels on the repository. |