mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 05:57:04 +04:00
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 <pepe.schlehofer@gmail.com>
This commit is contained in:
1 parent
9880cc45c2
commit
ef633e987f
4 files changed
+26
-111
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user