Skip to content

Workflow file for this run

name: CI Build
on:
pull_request:
branches: [dev]
push:
branches: [dev]
workflow_dispatch:
jobs:
builder:
env:
REGISTRY: ghcr.io
BUILDER_IMAGE_BASE: ghcr.io/draios/sysdig-builder-pr
SKEL_BUILDER_IMAGE_BASE: ghcr.io/draios/sysdig-skel-builder-pr
BUILDER_DEV: ghcr.io/draios/sysdig-builder:dev
SKEL_BUILDER_DEV: ghcr.io/draios/sysdig-skel-builder:dev
permissions: read-all|write-all
permissions:

Check failure on line 19 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

You have an error in your yaml syntax on line 19
packages: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout Sysdig
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if builder is modified
id: builder-files
uses: tj-actions/changed-files@v34
with:
files: |
docker/builder/**
- name: Set up QEMU
if: steps.builder-files.outputs.any_changed == 'true'
uses: docker/setup-qemu-action@v3
with:
platforms: 'amd64,arm64'
- name: Set up Docker Buildx
if: steps.builder-files.outputs.any_changed == 'true'
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
if: steps.builder-files.outputs.any_changed == 'true'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get new builder image tag
id: get-new-builder
if: steps.builder-files.outputs.any_changed == 'true'
run: |
echo "builder_image=${{ (github.event.pull_request.number != '') && format('{0}:{1}', env.BUILDER_IMAGE_BASE, github.event.pull_request.number) || env.BUILDER_DEV }}" >> $GITHUB_OUTPUT
- name: Build new builder
id: build-builder
if: steps.builder-files.outputs.any_changed == 'true'
uses: docker/build-push-action@v6
with:
context: docker/builder
platforms: linux/amd64,linux/arm64
tags: ${{ steps.get-new-builder.outputs.builder_image }}
push: true
outputs:
builder_image: ${{ (steps.builder-files.outputs.any_changed == 'true') && steps.get-new-builder.outputs.builder_image || env.BUILDER_DEV }}
build-sysdig-linux:
needs: [builder]
runs-on: ubuntu-latest
container:
image: ${{ needs.builder.outputs.builder_image }}
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Checkout Sysdig
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Sysdig
run: |
cmake -DUSE_BUNDLED_DEPS=ON -DBUILD_BPF=OFF -DBUILD_DRIVER=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build -G Ninja
cmake --build build --target package --config Release
- name: Set artifact name
id: artifact_name
run: |
echo "name=sysdig-dev-$(echo ${{ matrix.platform }} | sed -e 's|/|-|g')" >> $GITHUB_OUTPUT
- name: Upload rpm package
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact_name.outputs.name }}.rpm
path: |
build/sysdig-*.rpm
- name: Upload deb package
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact_name.outputs.name }}.deb
path: |
build/sysdig-*.deb
- name: Upload tar.gz package
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact_name.outputs.name }}.tar.gz
path: |
build/sysdig-*.tar.gz
build-sysdig-others-amd64:
name: build-sysdig-other-amd64
strategy:
matrix:
os: [windows-latest, macos-13]
include:
- os: windows-latest
artifact_name: win
artifact_ext: exe
- os: macos-13
artifact_name: osx
artifact_ext: dmg
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Sysdig
uses: actions/checkout@v4
- name: Build
run: |
cmake -Wno-dev -S . -B build
cmake --build build --target package --config Release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: sysdig-dev-${{ matrix.artifact_name }}-x86_64.${{ matrix.artifact_ext }}
path: |
build/sysdig-*.${{ matrix.artifact_ext }}
build-sysdig-others-arm64:
name: build-sysdig-other-arm64
strategy:
matrix:
os: [macos-14]
include:
- os: macos-14
artifact_name: osx
artifact_ext: dmg
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Sysdig
uses: actions/checkout@v4
- name: Build
run: |
cmake -Wno-dev -S . -B build
cmake --build build --target package --config Release
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: sysdig-dev-${{ matrix.artifact_name }}-arm64.${{ matrix.artifact_ext }}
path: |
build/sysdig-*.${{ matrix.artifact_ext }}