Skip to content

Commit

Permalink
do not build on file change. allow for pr push and master push
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Apr 6, 2020
1 parent 8287938 commit 704b28f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build-selenium.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
paths:
- inst/selenium/src/main/kotlin/com/rstudio/seleniumRunner/Main.kt
# paths:
# - inst/selenium/src/main/kotlin/com/rstudio/seleniumRunner/Main.kt
branches:
- master
- ghactions
Expand Down Expand Up @@ -49,8 +49,14 @@ jobs:
mvn package
cp target/selenium-1.0.0-jar-with-dependencies.jar selenium.jar
git add selenium.jar
git commit -m 'Maven build (GitHub Actions)' || echo "No Maven changes to commit"
- name: Git Push
- name: Git Push (PR)
uses: r-lib/actions/pr-push@master
if: github.event_name != 'push'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Git Push (Branch)
if: github.event_name == 'push'
run: |
git commit -m 'Maven build (GitHub Actions)' || echo "No Maven changes to commit"
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{ github.ref }} || echo "No changes to push"

0 comments on commit 704b28f

Please sign in to comment.