Don't allow test-format.sh to be run locally

This commit is contained in:
Riku Isokoski 2022-05-10 22:29:20 +03:00 committed by NeroBurner
parent 443408312a
commit a6fcdec0f8
2 changed files with 7 additions and 5 deletions

View File

@ -24,7 +24,7 @@ jobs:
sudo apt-get -y install clang-format-12
- name: Check formatting
run: tests/test-format.sh "$GITHUB_BASE_REF"
run: tests/test-format.sh
- name: Upload patches
uses: actions/upload-artifact@v3

View File

@ -2,11 +2,13 @@
set -e
[ -z "$1" ] && exit
if [ -z "$GITHUB_BASE_REF" ]
then
echo "This script is only meant to be run in a GitHub Workflow"
exit 1
fi
basebranch=$1
CHANGED_FILES=$(git diff --name-only "$basebranch"...HEAD)
CHANGED_FILES=$(git diff --name-only "$GITHUB_BASE_REF"...HEAD)
CHANGED=0