Skip to content

Commit

Permalink
added CI stable build (#1103)
Browse files Browse the repository at this point in the history
* added CI stable build
  * ci action: directly test for event type and schedule build for stable branch if event type is schedule
  • Loading branch information
jstucke authored Aug 11, 2023
1 parent 8e6bd00 commit 6e0ddf1
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,30 @@ on:
workflow_dispatch:

jobs:
generate-matrix:
name: Generate matrix for build
runs-on: ubuntu-latest
outputs:
target: ${{ steps.set-matrix.outputs.target }}
steps:
- id: set-matrix
run: |
echo "github.ref: ${GITHUB_REF}, name: ${GITHUB_REF_NAME}, event: ${GITHUB_EVENT_NAME}"
if [ "${GITHUB_EVENT_NAME}" = "schedule" ]; then
# scheduled build -> use master & stable branch
export TARGET='["refs/heads/master","refs/heads/stable"]'
else
# Pull Request -> only use that branch
export TARGET="[\"${GITHUB_REF}\"]"
fi
echo "target=${TARGET}" | tee -a $GITHUB_OUTPUT
build-ci:
needs: generate-matrix
strategy:
fail-fast: false
matrix:
os: [ focal, jammy, bullseye, bookworm ]
target: ${{ fromJson(needs.generate-matrix.outputs.target) }}
runs-on: [ self-hosted, linux, x64, "${{ matrix.os }}" ]
timeout-minutes: 35
steps:
Expand All @@ -38,7 +57,7 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
ref: ${{ matrix.target }}
- name: Set ulimit
run: ulimit -n 9999
- name: venv Setup
Expand Down

0 comments on commit 6e0ddf1

Please sign in to comment.