forked from thought-machine/falco-probes
-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (25 loc) · 1.31 KB
/
docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: docs
on: [push]
jobs:
run-build-design-proof:
# This job runs the proof of building a Falco eBPF probe in Bash w/ Docker from docs/BUILD_DESIGN.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: amazonlinux2
run: |
kernel_pkgs=$(docker run --rm amazonlinux:2 yum --showduplicates list kernel-devel | tail -n+3 | awk '{ print $2 }')
last_kernel_pkg=$(echo "${kernel_pkgs}" | tail -n1)
bash ./docs/BUILD_DESIGN_assets/build-amazonlinux2-ebpf-probe.sh "$last_kernel_pkg"
- name: cos
run: |
last_image_name=$(
git clone -q https://cos.googlesource.com/cos/manifest-snapshots /tmp/cos &&
REFS=($(git -C /tmp/cos ls-remote -q --sort=-v:refname --head origin 'refs/heads/release-R*' | head -n1)) &&
MILESTONE="${REFS[1]##*release-R}" &&
BUILD_IDS=$(git -C /tmp/cos log --pretty="%D" "origin/release-R${MILESTONE}" | sed -e 's/.*tag: \([0-9\.]\+\).*/\1/g') &&
for BUILD_ID in ${BUILD_IDS[@]}; do \
if curl -fIs "https://storage.googleapis.com/cos-tools/${BUILD_ID}/kernel_commit" > /dev/null; then break; fi \
done &&
echo "cos-$MILESTONE-${BUILD_ID//./-}")
bash ./docs/BUILD_DESIGN_assets/build-cos-ebpf-probe.sh "$last_image_name"