mirror of
https://github.com/crate-ci/typos.git
synced 2025-01-23 23:18:57 -05:00
fix(action): Don't check all when no checked files are changed
This commit is contained in:
parent
a295aeb9ac
commit
4df83719b2
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,10 @@ if [[ -n "${GITHUB_BASE_REF:-}" ]]; then
|
||||||
if git rev-parse --verify ${BASE_REF} 2>/dev/null ; then
|
if git rev-parse --verify ${BASE_REF} 2>/dev/null ; then
|
||||||
log "Limiting checks to ${GITHUB_BASE_REF}...HEAD"
|
log "Limiting checks to ${GITHUB_BASE_REF}...HEAD"
|
||||||
TARGET=$(git diff ${BASE_REF}...HEAD --name-only --diff-filter=AM -- ${TARGET})
|
TARGET=$(git diff ${BASE_REF}...HEAD --name-only --diff-filter=AM -- ${TARGET})
|
||||||
|
if [[ -z "${TARGET:-}" ]]; then
|
||||||
|
log "INPUT_FILES are unchanged"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
log "WARN: Not limiting checks to ${BASE_REF}...HEAD, ${GITHUB_BASE_REF} is not available"
|
log "WARN: Not limiting checks to ${BASE_REF}...HEAD, ${GITHUB_BASE_REF} is not available"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue