Skip to content

Commit

Permalink
ci: use git status to detect changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Aug 13, 2024
1 parent 6c60877 commit 9f8646f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bundle-impact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/register-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion scripts/checkout-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9f8646f

Please sign in to comment.