From e842289732c2992d87d9db48545dbfc8bc78607b Mon Sep 17 00:00:00 2001 From: Puranjay Mohan Date: Wed, 18 Feb 2026 06:04:56 -0800 Subject: [PATCH] build-cilium: Add support for passing revision The build script already supports passing a custom revision to build but the action doesn't use it. Add a new input parameter to the action and pass it to the script. Create a new cilium-revision file in the output directory with the hash of the cilium repository from where these bpf programs were built. Signed-off-by: Puranjay Mohan --- build-cilium/action.yml | 4 ++++ build-cilium/build-cilium.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/build-cilium/action.yml b/build-cilium/action.yml index 54dca61..025c0d1 100644 --- a/build-cilium/action.yml +++ b/build-cilium/action.yml @@ -3,6 +3,9 @@ inputs: output-dir: description: 'Path to the output of cilium build' required: true + cilium-revision: + description: 'Cilium revision to build. main is used by default' + required: false runs: using: "composite" @@ -15,5 +18,6 @@ runs: - name: Build cilium/cilium bpf programs env: OUTPUT_DIR: ${{ inputs.output-dir }} + CILIUM_REVISION: ${{ inputs.cilium-revision }} shell: bash run: ${GITHUB_ACTION_PATH}/build-cilium.sh diff --git a/build-cilium/build-cilium.sh b/build-cilium/build-cilium.sh index 1a8ab52..8a7dd1a 100755 --- a/build-cilium/build-cilium.sh +++ b/build-cilium/build-cilium.sh @@ -40,4 +40,6 @@ popd extract_bpf_progs bpf "*.o" $OUTPUT_DIR/bpf +git rev-parse HEAD > $OUTPUT_DIR/cilium-revision + popd