From fc442e0a66fec692bdde425b6e25a0f6ac4ff565 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Mon, 16 Oct 2023 17:23:30 +0300 Subject: [PATCH] .github/workflows: Add PR auto-labelling Signed-off-by: Cezar Craciunoiu --- .github/workflows/label.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/label.yaml diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml new file mode 100644 index 000000000..c3ce14caa --- /dev/null +++ b/.github/workflows/label.yaml @@ -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 }} + -- 2.39.5