-
Notifications
You must be signed in to change notification settings - Fork 1.6k
51 lines (49 loc) · 1.54 KB
/
build-master-packages.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
on:
push:
branches:
- master
workflow_dispatch:
inputs:
version:
description: Version of Fluent Bit to build
required: false
default: master
target:
description: Only build a specific target, intended for debug/test builds only.
required: false
default: ""
name: Build packages for master
jobs:
master-build-generate-matrix:
name: Staging build matrix
runs-on: ubuntu-latest
outputs:
build-matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
# Set up the list of target to build so we can pass the JSON to the reusable job
- id: set-matrix
run: |
matrix=$((
echo '{ "distro" : [ "debian/bullseye", "ubuntu/20.04", "ubuntu/22.04", "centos/7" ]}'
) | jq -c .)
if [ -n "${{ github.event.inputs.target || '' }}" ]; then
echo "Overriding matrix to build: ${{ github.event.inputs.target }}"
matrix=$((
echo '{ "distro" : ['
echo '"${{ github.event.inputs.target }}"'
echo ']}'
) | jq -c .)
fi
echo $matrix
echo $matrix| jq .
echo "::set-output name=matrix::$matrix"
shell: bash
master-build-packages:
needs: master-build-generate-matrix
uses: ./.github/workflows/call-build-linux-packages.yaml
with:
version: master
ref: master
build_matrix: ${{ needs.master-build-generate-matrix.outputs.build-matrix }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}