1
0
Fork 0
mirror of https://github.com/imjasonh/snoop synced 2026-07-14 11:26:16 +00:00

WIP: update codegen in CI

Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Jason Hall 2026-01-14 15:49:38 -05:00
parent 849312ec12
commit 8488ee7e0b

32
.github/workflows/codegen.yaml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Update codegen
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- run: |
sudo apt-get update
sudo apt-get install -y clang llvm libbpf-dev linux-headers-generic
- run: |
sudo bpftool btf dump file /sys/kernel/btf/vmlinux format c > pkg/ebpf/bpf/vmlinux.h
go generate ./pkg/ebpf/bpf
# Check for changes. Commit and push them.
- run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Update generated code"
git push
else
echo "No changes to commit"
fi