Skip to content

Commit

Permalink
Merge pull request #70 from lbl-srg/issue69_fixGHActions
Browse files Browse the repository at this point in the history
Fix GH action
  • Loading branch information
JayHuLBL authored Sep 13, 2023
2 parents 29080f8 + e96e846 commit e24e305
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CMake

on: [push]
on:
pull_request:
branches:
- 'master'
push:
branches:
- 'master'

env:
BUILD_TYPE: Release
Expand Down Expand Up @@ -66,12 +72,16 @@ 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 [email protected]
git config --global pull.rebase false
git pull
git add ${{ github.workspace }}/pyfunnel/lib
git diff-index --quiet HEAD || git commit -m "Add ${{ matrix.os }} binaries"
git pull
git push

0 comments on commit e24e305

Please sign in to comment.