From 425f3c74dbf8c03c4b677ca707a2a6a8b96196a5 Mon Sep 17 00:00:00 2001 From: mattip Date: Thu, 8 Aug 2024 09:35:17 +0300 Subject: [PATCH] only trigger nightly build on main branch --- .github/workflows/posix.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 5b7ff12..c766dc7 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -71,6 +71,7 @@ jobs: REPO_DIR: OpenBLAS OPENBLAS_COMMIT: "v0.3.27" NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + BRANCH_NAME: ${{ github.ref_name }} MACOSX_DEPLOYMENT_TARGET: 10.9 MB_PYTHON_VERSION: ${{ matrix.python-version }} TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} @@ -125,7 +126,8 @@ jobs: source tools/build_steps.sh echo "------ BEFORE BUILD ---------" before_build - if [[ "$NIGHTLY" = "true" ]]; then + echo BRANCH_NAME is "${BRANCH_NAME}" + if [ "$NIGHTLY" = "true" -a "$BRANCH_NAME" = "main" ]; then echo "------ CLEAN CODE --------" clean_code $REPO_DIR develop echo "------ BUILD LIB --------"