]> git.99rst.org Git - openwrt-packages.git/commitdiff
ci: replace GitHub actions (labeler, formalities) by webhook
authorJosef Schlehofer <redacted>
Sun, 28 Jun 2026 19:31:48 +0000 (21:31 +0200)
committerJosef Schlehofer <redacted>
Mon, 29 Jun 2026 10:11:08 +0000 (12:11 +0200)
- Added file .github/formalities.json, which can be configured
in this repository, otherwise it uses defaults.

- Removed GitHub Action Labeler workflow as it was implemented
by webhook to be faster

- Updated multi-arch-test-build.yml to run builds when Formalities Check passes

Signed-off-by: Josef Schlehofer <redacted>
.github/formalities.json [new file with mode: 0644]
.github/labeler.yml [deleted file]
.github/workflows/labeler.yml [deleted file]
.github/workflows/multi-arch-test-build.yml

diff --git a/.github/formalities.json b/.github/formalities.json
new file mode 100644 (file)
index 0000000..f69bc22
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "check_branch": true,
+  "check_merge_commits": true,
+  "check_noreply_email": true,
+  "check_signoff": true,
+  "check_signature": true,
+  "allow_autosquash": true,
+  "enable_comments": true,
+  "max_subject_len_soft": 60,
+  "max_subject_len_hard": 80,
+  "max_body_line_len": 100,
+  "warn_duplicate_body": true,
+  "warn_generic_subjects": true,
+  "require_release_notes": true,
+  "check_pkg_version": true,
+  "check_crlf": true,
+  "add_package_label": true,
+  "drop_package_label": true,
+  "branch_labeling": true,
+  "check_openwrt_meta": true,
+  "check_conffiles": true,
+  "check_patch_headers": true
+}
diff --git a/.github/labeler.yml b/.github/labeler.yml
deleted file mode 100644 (file)
index ed3168f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# GitHub/CI
-"GitHub/CI":
-- changed-files:
-  - any-glob-to-any-file:
-    - ".github/**"
-
-# branches
-"OpenWrt 23.05 (end of support)":
-- base-branch:
-  - "openwrt-23.05"
-"OpenWrt 24.10":
-- base-branch:
-  - "openwrt-24.10"
-"OpenWrt 25.12":
-- base-branch:
-  - "openwrt-25.12"
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
deleted file mode 100644 (file)
index a22139f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-name: 'Pull Request Labeler'
-on:
-  pull_request_target:
-
-permissions:
-  contents: read
-  pull-requests: write
-
-jobs:
-  labeler:
-    name: Pull Request Labeler
-    runs-on: ubuntu-slim
-    steps:
-      - uses: actions/labeler@v6
-        with:
-          repo-token: '${{ secrets.GITHUB_TOKEN }}'
-          sync-labels: true
-
-      - name: Checkout base code
-        uses: actions/checkout@v7
-        with:
-          ref: ${{ github.event.pull_request.base.sha }}
-          fetch-depth: 0
-
-      - name: Fetch PR commits
-        run: git fetch origin pull/${{ github.event.pull_request.number }}/head
-
-      - name: Check for PKG_VERSION changes
-        id: check_version
-        # Check for new packages (any Makefile with status 'A' - Added)
-        # Check for dropped packages (any Makefile with status 'D' - Deleted)
-        run: |
-          if git diff --name-only --diff-filter=A HEAD...FETCH_HEAD -- '**/Makefile' | grep -q .; then
-            echo "New package detected."
-            echo "new_package=true" >> $GITHUB_OUTPUT
-          fi
-
-          if git diff --name-only --diff-filter=D HEAD...FETCH_HEAD -- '**/Makefile' | grep -q .; then
-            echo "Dropped package detected."
-            echo "dropped_package=true" >> $GITHUB_OUTPUT
-          fi
-
-      - name: Add 'Add package' label
-        if: steps.check_version.outputs.new_package == 'true'
-        uses: buildsville/add-remove-label@v2.0.1
-        with:
-          token: ${{ secrets.GITHUB_TOKEN }}
-          labels: "Add package"
-          type: add
-
-      - name: Remove 'Add package' label
-        if: steps.check_version.outputs.new_package != 'true'
-        uses: buildsville/add-remove-label@v2.0.1
-        with:
-          token: ${{ secrets.GITHUB_TOKEN }}
-          labels: "Add package"
-          type: remove
-
-      - name: Add 'Drop package' label
-        if: steps.check_version.outputs.dropped_package == 'true'
-        uses: buildsville/add-remove-label@v2.0.1
-        with:
-          token: ${{ secrets.GITHUB_TOKEN }}
-          labels: "Drop package"
-          type: add
-
-      - name: Remove 'Drop package' label
-        if: steps.check_version.outputs.dropped_package != 'true'
-        uses: buildsville/add-remove-label@v2.0.1
-        with:
-          token: ${{ secrets.GITHUB_TOKEN }}
-          labels: "Drop package"
-          type: remove
index a56d95b17404c19350776a69f48a93e850f4fb5f..3520d83f90ab8f04b1d8efb06bdc0ad5e1d4c047 100644 (file)
@@ -1,34 +1,15 @@
 name: Test and Build
 
 on:
-  pull_request:
+  check_run:
+    types: [completed]
 
 permissions:
   contents: read
   pull-requests: write
 
 jobs:
-  formalities:
-    name: Test Formalities
-    runs-on: ubuntu-slim
-    steps:
-      - name: HyperStickler
-        uses: georgesapkin/hyperstickler@v1
-        with:
-          check_branch: false
-          check_signoff: true
-          feedback_url: 'https://github.com/openwrt/actions-shared-workflows/issues'
-          guideline_url: 'https://openwrt.org/submitting-patches#submission_guidelines'
-          max_body_line_len: 100
-          max_subject_len_hard: 80
-          max_subject_len_soft: 60
-          # This still needs a fine-grained token related to:
-          # https://github.com/openwrt/packages/pull/28011
-          # job_step: 2
-          # post_comment: true
-          # warn_on_no_modify: true
-
   build:
     name: Feeds Package Test Build
-    needs: formalities
+    if: ${{ github.event.check_run.name == 'Formalities Check' && github.event.check_run.conclusion == 'success' }}
     uses: openwrt/actions-shared-workflows/.github/workflows/multi-arch-test-build.yml@main
git clone https://git.99rst.org/PROJECT