4c3df28f51bb37dae3446363b53689fe174e109a
[openwrt/staging/hauke.git] / .github / workflows / label-target.yml
1 # ci:target:x86:64 is going to trigger CI target check jobs for x86/64 target
2
3 name: Build check target specified in labels
4 on:
5 pull_request:
6 types:
7 - labeled
8
9 jobs:
10 set_target:
11 if: startsWith(github.event.label.name, 'ci:target:')
12 name: Set target
13 runs-on: ubuntu-latest
14 outputs:
15 target: ${{ steps.set_target.outputs.target }}
16
17 steps:
18 - name: Set target
19 id: set_target
20 env:
21 CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
22 run: |
23 echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target="\1"/p' | tee --append $GITHUB_OUTPUT
24 echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget="\2"/p' | tee --append $GITHUB_OUTPUT
25
26 build_target:
27 name: Build target
28 needs: set_target
29 permissions:
30 contents: read
31 packages: read
32 uses: ./.github/workflows/build.yml
33 with:
34 target: ${{ needs.set_target.outputs.target }}
35 subtarget: ${{ needs.set_target.outputs.subtarget }}
36 build_full: true
37 build_all_kmods: true
38 build_all_boards: true
39 build_all_modules: true