Skip to content

Commit 98c4d61

Browse files
authored
Merge pull request #174 from mattip/trigger
CI: only trigger nightly build on main branch
2 parents 15c6999 + 425f3c7 commit 98c4d61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/posix.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
REPO_DIR: OpenBLAS
7272
OPENBLAS_COMMIT: "v0.3.27"
7373
NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
74+
BRANCH_NAME: ${{ github.ref_name }}
7475
MACOSX_DEPLOYMENT_TARGET: 10.9
7576
MB_PYTHON_VERSION: ${{ matrix.python-version }}
7677
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
@@ -125,7 +126,8 @@ jobs:
125126
source tools/build_steps.sh
126127
echo "------ BEFORE BUILD ---------"
127128
before_build
128-
if [[ "$NIGHTLY" = "true" ]]; then
129+
echo BRANCH_NAME is "${BRANCH_NAME}"
130+
if [ "$NIGHTLY" = "true" -a "$BRANCH_NAME" = "main" ]; then
129131
echo "------ CLEAN CODE --------"
130132
clean_code $REPO_DIR develop
131133
echo "------ BUILD LIB --------"

0 commit comments

Comments
 (0)