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:
parent
849312ec12
commit
8488ee7e0b
1 changed files with 32 additions and 0 deletions
32
.github/workflows/codegen.yaml
vendored
Normal file
32
.github/workflows/codegen.yaml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue