mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-21 19:44:57 +00:00
94 lines
2.8 KiB
YAML
94 lines
2.8 KiB
YAML
name: Dev Packages and Docker images
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
# Checks if any concurrent jobs is running for master CI and eventually cancel it
|
|
concurrency:
|
|
group: ci-master
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# We need to use an ubuntu-latest to fetch Falco version because
|
|
# Falco version is computed by some cmake scripts that do git sorceries
|
|
# to get the current version.
|
|
# But centos7 jobs have a git version too old and actions/checkout does not
|
|
# fully clone the repo, but uses http rest api instead.
|
|
fetch-version:
|
|
runs-on: ubuntu-latest
|
|
# Map the job outputs to step outputs
|
|
outputs:
|
|
version: ${{ steps.store_version.outputs.version }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y cmake build-essential
|
|
|
|
- name: Configure project
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake -DUSE_BUNDLED_DEPS=On ..
|
|
|
|
- name: Load and store Falco version output
|
|
id: store_version
|
|
run: |
|
|
FALCO_VERSION=$(cat build/userspace/falco/config_falco.h | grep 'FALCO_VERSION ' | cut -d' ' -f3 | sed -e 's/^"//' -e 's/"$//')
|
|
echo "version=${FALCO_VERSION}" >> $GITHUB_OUTPUT
|
|
|
|
build-dev-packages:
|
|
needs: [fetch-version]
|
|
uses: ./.github/workflows/reusable_build_packages.yaml
|
|
with:
|
|
arch: x86_64
|
|
version: ${{ needs.fetch-version.outputs.version }}
|
|
secrets: inherit
|
|
|
|
build-dev-packages-arm64:
|
|
needs: [fetch-version]
|
|
uses: ./.github/workflows/reusable_build_packages.yaml
|
|
with:
|
|
arch: aarch64
|
|
version: ${{ needs.fetch-version.outputs.version }}
|
|
secrets: inherit
|
|
|
|
publish-dev-packages:
|
|
needs: [fetch-version, build-dev-packages, build-dev-packages-arm64]
|
|
uses: ./.github/workflows/reusable_publish_packages.yaml
|
|
with:
|
|
bucket_suffix: '-dev'
|
|
version: ${{ needs.fetch-version.outputs.version }}
|
|
secrets: inherit
|
|
|
|
build-dev-docker:
|
|
needs: [fetch-version, publish-dev-packages]
|
|
uses: ./.github/workflows/reusable_build_docker.yaml
|
|
with:
|
|
arch: x86_64
|
|
bucket_suffix: '-dev'
|
|
version: ${{ needs.fetch-version.outputs.version }}
|
|
tag: master
|
|
secrets: inherit
|
|
|
|
build-dev-docker-arm64:
|
|
needs: [fetch-version, publish-dev-packages]
|
|
uses: ./.github/workflows/reusable_build_docker.yaml
|
|
with:
|
|
arch: aarch64
|
|
bucket_suffix: '-dev'
|
|
version: ${{ needs.fetch-version.outputs.version }}
|
|
tag: master
|
|
secrets: inherit
|
|
|
|
publish-dev-docker:
|
|
needs: [fetch-version, build-dev-docker, build-dev-docker-arm64]
|
|
uses: ./.github/workflows/reusable_publish_docker.yaml
|
|
with:
|
|
tag: master
|
|
secrets: inherit
|