name: GitHub Label Sync on: pull_request: push: branches: - 'main' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: dry-run: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3 with: config-file: .github/labels.yml delete-other-labels: true dry-run: true token: ${{ secrets.GITHUB_TOKEN }} # !!! This check should be required by GitHub !!! labels-status-check: if: always() needs: - dry-run runs-on: ubuntu-latest steps: - uses: re-actors/alls-green@release/v1 with: jobs: ${{ toJSON(needs) }} allowed-skips: dry-run sync: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2.3.3 with: config-file: .github/labels.yml delete-other-labels: true token: ${{ secrets.GITHUB_TOKEN }}