File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ jobs:
1616 matrix :
1717 os : [ubuntu-latest, windows-latest, macos-latest]
1818 steps :
19- - name : Checkout PR branch with history
19+ - name : Checkout PR branch with full history
2020 uses : actions/checkout@v3
2121 with :
22- fetch-depth : 0 # allow accurate diffs
22+ fetch-depth : 0 # full history for accurate diffing
2323 - name : Add upstream remote and fetch base branch
2424 run : |
2525 git remote add upstream https://github.com/${{ github.repository }}.git
@@ -43,12 +43,14 @@ jobs:
4343 echo "scripts_modified=false" >> $GITHUB_OUTPUT
4444 fi
4545 - name : Decide whether to run scripts
46- id : check
46+ id : safecheck
4747 run : |
48- if [ "${{ steps.forkcheck.outputs.is_fork }}" = "true" ] && [ "${{ steps. filecheck.outputs.scripts_modified }}" = "true " ]; then
49- echo "safe=false " >> $GITHUB_OUTPUT
50- else
48+ if [ "${{ steps.filecheck.outputs.scripts_modified }}" = "false " ]; then
49+ echo "safe=true " >> $GITHUB_OUTPUT
50+ elif [ "${{ steps.forkcheck.outputs.is_fork }}" = "false" ]; then
5151 echo "safe=true" >> $GITHUB_OUTPUT
52+ else
53+ echo "safe=false" >> $GITHUB_OUTPUT
5254 fi
5355 - name : Execute install scripts
5456 if : steps.safecheck.outputs.safe == 'true'
You can’t perform that action at this time.
0 commit comments