Skip to content

Commit 9bb28aa

Browse files
committed
Update check-restricted-files.yaml
1 parent b51fca1 commit 9bb28aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/check-restricted-files.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020
- name: Check changed files
2121
shell: bash
2222
run: |
23+
set +e
24+
2325
# TODO: skip if base.ref is main
2426
25-
changes = $(git diff --exit-code --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} -- schemas versions)
26-
if [[ $changes -ne 0 ]]; then
27+
git diff --exit-code --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} -- schemas versions
28+
if [[ $? -ne 0 ]]; then
2729
echo This PR contains changes to files that should not be changed on ${{ github.event.pull_request.base.ref }}
2830
exit 1
2931
fi

0 commit comments

Comments
 (0)