Skip to content

Commit

Permalink
workflows: support building from branch (#4499)
Browse files Browse the repository at this point in the history
* workflows: support building from branch

Signed-off-by: Patrick Stephens <[email protected]>

* workflows: temporarily invoke on branch

Signed-off-by: Patrick Stephens <[email protected]>

* workflows: resolve missing comma in staging build

Signed-off-by: Patrick Stephens <[email protected]>

* workflows: resolve incorrect directory

Signed-off-by: Patrick Stephens <[email protected]>

* workflows: resolve incorrect directory

Signed-off-by: Patrick Stephens <[email protected]>

* workflows: revert to correct master branch

Signed-off-by: Patrick Stephens <[email protected]>
  • Loading branch information
patrick-stephens authored Dec 21, 2021
1 parent 15ed858 commit b3857f4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-master-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
uses: fluent/fluent-bit/.github/workflows/call-build-packages.yaml@master
with:
version: master
branch: master
build_matrix: ${{ needs.master-build-generate-matrix.outputs.build-matrix }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 10 additions & 2 deletions .github/workflows/call-build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
description: The Github environment to run this workflow on.
type: string
required: false
branch:
description: The optional source code branch to use for building against.
type: string
required: false
secrets:
token:
description: The Github token or similar to authenticate with.
Expand Down Expand Up @@ -61,16 +65,19 @@ jobs:

- name: Build the ${{ matrix.distro }} artifacts
run: |
./build.sh -v "${{ inputs.version }}" -d "${{ matrix.distro }}"
./build.sh
env:
FLB_VERSION: ${{ inputs.version }}
FLB_DISTRO: ${{ matrix.distro }}
FLB_OUT_DIR: staging
FLB_BRANCH: ${{ inputs.branch }}
working-directory: packaging

- name: Upload the ${{ matrix.distro }} artifacts
uses: actions/upload-artifact@v2
with:
name: packages-${{ inputs.version }}-${{ steps.formatted_distro.outputs.replaced }}
path: packaging/packages/staging/
path: packaging/packages/
if-no-files-found: error

- name: Retrieve target info for repo creation
Expand All @@ -90,6 +97,7 @@ jobs:
exit 1
fi
fi
echo "$TARGET"
echo ::set-output name=echo ::set-output name=target::$TARGET
env:
DISTRO: ${{ matrix.distro }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
echo '"amazonlinux/2", "amazonlinux/2.arm64v8",'
echo '"centos/7", "centos/7.arm64v8", "centos/8", "centos/8.arm64v8",'
echo '"debian/stretch", "debian/stretch.arm64v8", "debian/buster", "debian/buster.arm64v8", "debian/bullseye", "debian/bullseye.arm64v8",'
echo '"ubuntu/16.04", "ubuntu/18.04", "ubuntu/20.04", "ubuntu/18.04.arm64v8", "ubuntu/20.04.arm64v8"'
echo '"ubuntu/16.04", "ubuntu/18.04", "ubuntu/20.04", "ubuntu/18.04.arm64v8", "ubuntu/20.04.arm64v8",'
echo '"raspbian/buster", "raspbian/bullseye"'
echo ']}'
) | jq -c .)
Expand Down

0 comments on commit b3857f4

Please sign in to comment.