Skip to content

Commit 3bdb69b

Browse files
changing logic to allow for script execution as long as powershell scripts have not been modified
1 parent 8f29209 commit 3bdb69b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/check-installation.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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'

0 commit comments

Comments
 (0)