From 5de72de528ca4fc299b15ce92e7faf55386b0ccb Mon Sep 17 00:00:00 2001 From: AntoineGautier Date: Wed, 13 Sep 2023 10:33:14 +0200 Subject: [PATCH] Fix GH action --- .github/workflows/cmake.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 399a31e..8e6b31b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -1,6 +1,12 @@ name: CMake -on: [push] +on: + pull_request: + branches: + - 'master' + push: + branches: + - 'master' env: BUILD_TYPE: Release @@ -66,7 +72,11 @@ jobs: run: ctest -C $BUILD_TYPE --verbose - name: Push binaries - if: contains(matrix.os, 'latest') && contains(matrix.python-version, '3.9') && github.event.pull_request.merged == true + if: | + contains(matrix.os, 'latest') && + contains(matrix.python-version, '3.9') && + ${{ github.event.name == 'push' }} && + ${{ github.ref == 'refs/heads/master' }} run: | git config --global user.name $GH_USERNAME git config --global user.email $GH_USERNAME@users.noreply.github.com