]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
.github/workflows: Add PR auto-labelling
authorCezar Craciunoiu <cezar.craciunoiu@gmail.com>
Mon, 16 Oct 2023 14:23:30 +0000 (17:23 +0300)
committerCezar Craciunoiu <cezar.craciunoiu@gmail.com>
Thu, 2 Nov 2023 15:23:12 +0000 (17:23 +0200)
Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com>
.github/workflows/label.yaml [new file with mode: 0644]

diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml
new file mode 100644 (file)
index 0000000..c3ce14c
--- /dev/null
@@ -0,0 +1,27 @@
+name: governctl
+
+on:
+  pull_request:
+    types: [opened, synchronize, reopened]
+    branches: [staging]
+
+jobs:
+  label:
+    runs-on: ubuntu-latest
+    name: label
+    steps:
+      - name: Install governctl
+        run: |
+          set -xe
+          wget -q "https://github.com/unikraft/governance/releases/download/v${GOVERN_VERSION}/governance_${GOVERN_VERSION}_linux_amd64.deb"
+          sudo dpkg -i "governance_${GOVERN_VERSION}_linux_amd64.deb"
+        env:
+          GOVERN_VERSION: 0.1.0
+
+      - name: Run checkpatch through governctl
+        run: governctl pr sync labels --labels-dir .github/labels
+        env:
+          PR_NUMBER: ${{ github.event.number }}
+          GOVERN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          GOVERN_GITHUB_USER: ${{ secrets.GH_CHECKPATCH_ACTOR }}
+