diff --git a/.github/workflows/bench-pr.yml b/.github/workflows/bench-pr.yml index 54a77d38..561bfd0a 100644 --- a/.github/workflows/bench-pr.yml +++ b/.github/workflows/bench-pr.yml @@ -23,7 +23,7 @@ jobs: run: | bash scripts/checkout-pr.sh src benchmarks - if git diff --quiet; then + if [ -z "$(git status --porcelain)" ]; then echo '::set-output name=has_changes::false' else echo '::set-output name=has_changes::true' diff --git a/.github/workflows/bundle-impact.yml b/.github/workflows/bundle-impact.yml index 4fc1a3c4..5dbf37e1 100644 --- a/.github/workflows/bundle-impact.yml +++ b/.github/workflows/bundle-impact.yml @@ -20,7 +20,7 @@ jobs: run: | bash scripts/checkout-pr.sh src - if git diff --quiet; then + if [ -z "$(git status --porcelain)" ]; then echo '::set-output name=has_changes::false' else echo '::set-output name=has_changes::true' diff --git a/.github/workflows/register-pr.yml b/.github/workflows/register-pr.yml index 10c74209..0c328122 100644 --- a/.github/workflows/register-pr.yml +++ b/.github/workflows/register-pr.yml @@ -20,7 +20,7 @@ jobs: run: | bash scripts/checkout-pr.sh src docs - if git diff --quiet; then + if [ -z "$(git status --porcelain)" ]; then echo '::set-output name=has_changes::false' else echo '::set-output name=has_changes::true' diff --git a/scripts/checkout-pr.sh b/scripts/checkout-pr.sh index 885e7edc..b9218639 100644 --- a/scripts/checkout-pr.sh +++ b/scripts/checkout-pr.sh @@ -6,4 +6,3 @@ set -e git remote add pr $PR_REPO_URL git fetch pr "$PR_HEAD_REF" git checkout "pr/$PR_HEAD_REF" -- $@ -git reset