Skip to content

Commit 7fe9777

Browse files
committed
Update check-restricted-files.yaml
1 parent a70985a commit 7fe9777

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ jobs:
2424
id: check-changes
2525
shell: bash
2626
run: |
27-
echo github.event_name=${{ github.event_name }}
28-
echo github.event.pull_request.base.sha=${{ github.event.pull_request.base.sha }}
29-
echo github.event.pull_request.base.ref=${{ github.event.pull_request.base.ref }}
30-
echo github.event.pull_request.head.sha=${{ github.event.pull_request.head.sha }}
31-
echo github.event.pull_request.head.ref=${{ github.event.pull_request.head.ref }}
32-
echo
33-
echo Diff between ${{ github.event.pull_request.head.ref }} and ${{ github.event.pull_request.base.ref }}
27+
# TODO: skip if base.ref is main
28+
3429
git diff --exit-code --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} -- schemas versions
30+
if [ $? -ne 0 ]; then
31+
echo This PR contains changes to files that should not be changed on ${{ github.event.pull_request.base.ref }}
32+
exit 1
33+
fi

0 commit comments

Comments
 (0)