File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,15 @@ permissions:
10
10
name : " Sync overleaf"
11
11
jobs :
12
12
sync :
13
- runs-on : ubuntu-latest
14
- steps :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
15
- uses : actions/checkout@v4
16
16
with :
17
17
ref : sync_overleaf
18
18
fetch-depth : ' 0'
19
+
19
20
- name : Sync overleaf
21
+ id : sync_overleaf
20
22
run : |
21
23
git remote add overleaf https://git:${OVERLEAF_TOKEN}@git.overleaf.com/65df171af9ff7989580f017d
22
24
git remote add origin_token https://git:${GITHUB_TOKEN}@github.com/columnflow/demo_docs.git
@@ -25,10 +27,14 @@ jobs:
25
27
git pull overleaf master
26
28
git push origin_token HEAD:sync_overleaf
27
29
30
+ commitDiffCount=$(git diff origin_token/sync_overleaf origin_token/master | wc -l)
31
+ echo "$foo" >> $GITHUB_OUTPUT
32
+
28
33
env :
29
34
OVERLEAF_TOKEN : ${{ secrets.OVERLEAF_TOKEN }}
30
35
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
36
- name : create pull request
37
+ if : steps.sync_overleaf.outputs.commitDiffCount > 0
32
38
run : gh pr create -B master -H sync_overleaf --title 'Merge sync_overleaf into master' --body 'Created by Github action'
33
39
env :
34
40
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments