From 9a47f660d5b0185fa23244bddc12d9f68f5ddb4c Mon Sep 17 00:00:00 2001 From: "Kim J. Nordmo" Date: Mon, 12 Sep 2022 14:54:05 +0200 Subject: [PATCH] (maint) Add label synchronizing This commit adds a new workflow file that will synchronize the labels located in the `.github` repository and combine the local label configuration file. --- .github/labels.yml | 3 +++ .github/workflows/label-sync.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/labels.yml create mode 100644 .github/workflows/label-sync.yml diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000000..422e212dfb --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,3 @@ +- name: "Video" + color: "D0E64E" + description: "The issue or PR requires a video to be recorded and included in a later PR." diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml new file mode 100644 index 0000000000..ec0b46c1ea --- /dev/null +++ b/.github/workflows/label-sync.yml @@ -0,0 +1,28 @@ +name: Sync labels +on: + workflow_dispatch: + schedule: + # Run at the end of the day (most likely UTC) + - cron: "0 0 * * *" + push: + branches: + - "master" + paths: + - ".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@v3.0.2 + - uses: EndBug/label-sync@v2.2.0 + with: + config-file: | + https://raw.githubusercontent.com/chocolatey/.github/master/.github/labels.yml + .github/labels.yml + request-token: ${{ secrets.SYNC_TOKEN }} # Used when getting the config files. + delete-other-labels: true + dry-run: false + token: ${{ secrets.SYNC_TOKEN }} # Used when updating the lables on the repository \ No newline at end of file