Skip to content

Commit 851337b

Browse files
committed
Fix: Kernel checker workflow as an action
Add reusable kernel checker workflows as action Signed-off-by: Vishal Kumar <viskuma@qti.qualcomm.com>
1 parent 6866803 commit 851337b

1 file changed

Lines changed: 19 additions & 24 deletions

File tree

.github/workflows/kernel_checkers.yml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,33 @@ name: Kernel Checkers
22
on:
33
pull_request:
44
branches:
5-
- main
65
- qcom-next-staging
76

87
jobs:
9-
checker:
10-
strategy:
11-
matrix:
12-
check: [check-uapi-headers, sparse-check, checkpatch, dt-binding-check, dtb-check]
13-
8+
prepare:
149
runs-on:
1510
group: GHA-Kernel-SelfHosted-RG
16-
labels: [ self-hosted, kernel-prd-u2404-x64-large-od-ephem ]
11+
labels: [self-hosted, kernel-prd-u2404-x64-large-od-ephem]
1712
steps:
18-
- name: Login to ghcr
19-
uses: docker/login-action@v3
20-
with:
21-
registry: ghcr.io
22-
username: ${{ github.actor }}
23-
password: ${{ secrets.GITHUB_TOKEN }}
24-
25-
- name: Pull docker image from ghcr
26-
run: |
27-
docker pull ghcr.io/qualcomm-linux/kmake-image:latest
28-
docker tag ghcr.io/qualcomm-linux/kmake-image:latest kmake-image
29-
30-
- name: Checkout code
13+
- name: Checkout PR Code
3114
uses: actions/checkout@v4
3215
with:
3316
fetch-depth: 0
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
outputs:
19+
kernel_src: ${{ github.workspace }}
20+
base_sha: ${{ github.event.pull_request.base.sha }}
21+
head_sha: ${{ github.event.pull_request.head.sha }}
3422

35-
- name: Clone checker scripts
36-
run: cd .. && git clone https://github.com/qualcomm-linux/kernel-checkers.git
23+
checker:
24+
needs: prepare
25+
uses: qualcomm-linux/kernel-checkers/.github/workflows/checker.yml@main
26+
with:
27+
check_name: ${{ matrix.check }}
28+
kernel_src: ${{ needs.prepare.outputs.kernel_src }}
29+
base_sha: ${{ needs.prepare.outputs.base_sha }}
30+
head_sha: ${{ needs.prepare.outputs.head_sha }}
3731

38-
- name: Run ${{ matrix.check }}
39-
run: bash ../kernel-checkers/${{ matrix.check }}.sh --kernel-src ${{ github.workspace }} --base ${{ github.event.pull_request.base.sha }} --head ${{ github.event.pull_request.head.sha }}
32+
strategy:
33+
matrix:
34+
check: [check-uapi-headers, sparse-check, checkpatch, dt-binding-check, dtb-check]

0 commit comments

Comments
 (0)