Skip to content

Commit

Permalink
workflows: add support to trigger a package build for a specific targ…
Browse files Browse the repository at this point in the history
…et (#5026)

Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens authored Mar 9, 2022
1 parent c434c95 commit 96ea803
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build-master-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ on:
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:
Expand All @@ -18,6 +27,14 @@ jobs:
matrix=$((
echo '{ "distro" : [ "debian/bullseye", "ubuntu/16.04", "ubuntu/18.04", "ubuntu/20.04" ]}'
) | 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"
Expand Down

0 comments on commit 96ea803

Please sign in to comment.