File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ permissions:
1010name : " Sync overleaf"
1111jobs :
1212 sync :
13- runs-on : ubuntu-latest
14- steps :
13+ runs-on : ubuntu-latest
14+ steps :
1515 - uses : actions/checkout@v4
1616 with :
1717 ref : sync_overleaf
1818 fetch-depth : ' 0'
19+
1920 - name : Sync overleaf
21+ id : sync_overleaf
2022 run : |
2123 git remote add overleaf https://git:${OVERLEAF_TOKEN}@git.overleaf.com/65df171af9ff7989580f017d
2224 git remote add origin_token https://git:${GITHUB_TOKEN}@github.com/columnflow/demo_docs.git
@@ -25,10 +27,14 @@ jobs:
2527 git pull overleaf master
2628 git push origin_token HEAD:sync_overleaf
2729
30+ commitDiffCount=$(git diff origin_token/sync_overleaf origin_token/master | wc -l)
31+ echo "$foo" >> $GITHUB_OUTPUT
32+
2833 env :
2934 OVERLEAF_TOKEN : ${{ secrets.OVERLEAF_TOKEN }}
3035 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3136 - name : create pull request
37+ if : steps.sync_overleaf.outputs.commitDiffCount > 0
3238 run : gh pr create -B master -H sync_overleaf --title 'Merge sync_overleaf into master' --body 'Created by Github action'
3339 env :
3440 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments