summaryrefslogtreecommitdiffstats
path: root/src/fluent-bit/.github/workflows/build-master-packages.yaml
blob: 5698abfe5b4bd34449c4a71bf02c567b6912039b (plain)
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 "matrix=$matrix" >> $GITHUB_OUTPUT
        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 }}