ci: label formality failures
authorGeorge Sapkin <[email protected]>
Fri, 7 Nov 2025 23:28:59 +0000 (01:28 +0200)
committerJosef Schlehofer <[email protected]>
Wed, 3 Dec 2025 10:20:05 +0000 (11:20 +0100)
Add or remove 'not following guidelines' label based on formality check
status.

Signed-off-by: George Sapkin <[email protected]>
.github/workflows/multi-arch-test-build.yml

index 2a78a114e6d9faeb2d741f99f3b5f95c1af0d76b..88554ade54680135b7253b3d9babe1ddba74e3e2 100644 (file)
@@ -8,6 +8,31 @@ jobs:
     name: Test Formalities
     uses: openwrt/actions-shared-workflows/.github/workflows/formal.yml@main
 
+  label_formality_status:
+    name: Add formality check labels
+    runs-on: ubuntu-slim
+    needs: formalities
+    if: always()
+    permissions:
+      pull-requests: write
+
+    steps:
+      - name: Add 'not following guidelines' label
+        if: needs.formalities.result == 'failure'
+        uses: buildsville/[email protected]
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          labels: "not following guidelines"
+          type: add
+
+      - name: Remove 'not following guidelines' label
+        if: needs.formalities.result == 'success'
+        uses: buildsville/[email protected]
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          labels: "not following guidelines"
+          type: remove
+
   build:
     name: Feeds Package Test Build
     needs: formalities