Skip to content

Commit a9737ba

Browse files
fix: run generate before lint
1 parent 37d43ca commit a9737ba

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/golangci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,34 @@ on:
1111
types:
1212
- checks_requested
1313
jobs:
14+
generate:
15+
name: Generate BPF Handling Code
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
25+
- name: Run go generate
26+
working-directory: ./bpf-prog/block-iptables
27+
run: go generate ./...
28+
29+
- name: Upload full bpfrogram directory
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: generated-bpf-program-code
33+
path: ./bpf-prog/block-iptables
1434
golangci:
1535
strategy:
1636
fail-fast: false
1737
matrix:
1838
go-version: ['1.22.x', '1.23.x']
1939
os: [ubuntu-latest, windows-latest]
2040
name: Lint
41+
needs: generate
2142
runs-on: ${{ matrix.os }}
2243
steps:
2344
- uses: actions/setup-go@v5
@@ -26,6 +47,11 @@ jobs:
2647
- uses: actions/checkout@v4
2748
with:
2849
fetch-depth: 0
50+
- name: Download bpfrogram
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: generated-bpf-program-code
54+
path: ./bpf-prog/block-iptables
2955
- name: golangci-lint
3056
uses: golangci/golangci-lint-action@v6
3157
with:

0 commit comments

Comments
 (0)