mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
ba3aa6233d
Current job triggers based on matching of changed paths is quite limited, so lets make it possible to additionally trigger manual CI jobs by adding CI specific pull request build labels: * `ci:target:x86:64` label is going to trigger CI target check jobs for x86/64 (sub)target. * `ci:kernel:x86:64` label is going to trigger CI kernel check jobs for x86/64 (sub)target. Signed-off-by: Petr Štetiar <ynezz@true.cz>
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
# ci:kernel:x86:64 is going to trigger CI kernel check jobs for x86/64 target
|
|
|
|
name: Build kernel and check patches for target specified in labels
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
|
|
jobs:
|
|
set_target:
|
|
if: startsWith(github.event.label.name, 'ci:kernel:')
|
|
name: Set target
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
target: ${{ steps.set_target.outputs.target }}
|
|
|
|
steps:
|
|
- name: Set target
|
|
id: set_target
|
|
env:
|
|
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
|
run: |
|
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target="\1\/\2"/p' | tee --append $GITHUB_OUTPUT
|
|
|
|
build_kernel:
|
|
name: Build Kernel with external toolchain
|
|
needs: set_target
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
uses: ./.github/workflows/build.yml
|
|
with:
|
|
target: ${{ needs.set_target.outputs.target }}
|
|
build_kernel: true
|
|
build_all_kmods: true
|
|
|
|
check-kernel-patches:
|
|
name: Check Kernel patches
|
|
needs: set_target
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
uses: ./.github/workflows/check-kernel-patches.yml
|
|
with:
|
|
target: ${{ needs.set_target.outputs.target }}
|