From: Josef Schlehofer Date: Sun, 28 Jun 2026 19:31:48 +0000 (+0200) Subject: ci: replace GitHub actions (labeler, formalities) by webhook X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=ef633e987f83adbcccfb14ef67fbb95a192818af;p=openwrt-packages.git ci: replace GitHub actions (labeler, formalities) by webhook - 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 --- diff --git a/.github/formalities.json b/.github/formalities.json new file mode 100644 index 000000000..f69bc2291 --- /dev/null +++ b/.github/formalities.json @@ -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 index ed3168fec..000000000 --- a/.github/labeler.yml +++ /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 index a22139faf..000000000 --- a/.github/workflows/labeler.yml +++ /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 diff --git a/.github/workflows/multi-arch-test-build.yml b/.github/workflows/multi-arch-test-build.yml index a56d95b17..3520d83f9 100644 --- a/.github/workflows/multi-arch-test-build.yml +++ b/.github/workflows/multi-arch-test-build.yml @@ -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