mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-29 04:21:06 -05:00
fix(action): Generalize safe directory
This commit is contained in:
parent
c7e576614e
commit
096a806b74
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ CMD_NAME="typos"
|
|||
TARGET=${INPUT_FILES:-"."}
|
||||
if [[ -n "${GITHUB_BASE_REF:-}" ]]; then
|
||||
BASE_REF=HEAD~ # HACK: GITHUB_BASE_REF is failing the `--verify` but `HEAD~ should be the same for pull requests
|
||||
git config --global --add safe.directory /github/workspace
|
||||
git config --global --add safe.directory "$PWD"
|
||||
if git rev-parse --verify ${BASE_REF} 2>/dev/null ; then
|
||||
log "Limiting checks to ${GITHUB_BASE_REF}...HEAD"
|
||||
TARGET=$(git diff ${BASE_REF}...HEAD --name-only --diff-filter=AM -- ${TARGET})
|
||||
|
|
Loading…
Reference in a new issue