bug(ci): ci-test-systemd workflow fails with protoc: No such file or directory
bug
## Bug Report
**General Information**
- Environment: GitHub Actions runner (ubuntu-22.04)
- Affected workflow: `.github/workflows/ci-test-systemd.yml`
- Affected step: `Install protoc` and `Build Systemd Release`
**To Reproduce**
1. Push a change to any path matching the workflow trigger (`KubeArmor/**`, `tests/**`, `protobuf/**`)
2. The `ci-test-systemd` workflow starts and reaches the `Build Systemd Release` step
3. `make local-release` invokes `make -C ../protobuf` which calls `protoc` directly
4. The step fails immediately
**Expected behavior**
The `protoc` compiler binary should be available on the runner so `make local-release` can compile the protobuf definitions and proceed with the systemd release build.
**Root Cause**
The `Install protoc` step installs only the Go protoc plugins via `go install`:
```yaml
- name: Install protoc
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
```
This does not install the `protoc` compiler binary itself. The `protobuf/Makefile` calls `protoc` directly, which is not on PATH, causing the build to fail with exit code 127.
**Screenshots**
<img width="1547" height="186" alt="Image" src="https://github.com/user-attachments/assets/4f12adf0-3099-47fe-bece-562a1e30690a" />
**Proposed Fix**
Update the `Install protoc` step in `.github/workflows/ci-test-systemd.yml` to also install the `protoc` binary and add the Go bin directory to PATH:
```yaml
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
```
0 条评论