Skip to content

Commit b51fca1

Browse files
committed
Update check-restricted-files.yaml
1 parent 7c3f185 commit b51fca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
run: |
2323
# TODO: skip if base.ref is main
2424
25-
git diff --exit-code --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} -- schemas versions
26-
if [[ $? -ne 0 ]]; then
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
2727
echo This PR contains changes to files that should not be changed on ${{ github.event.pull_request.base.ref }}
2828
exit 1
2929
fi

0 commit comments

Comments
 (0)