Skip to content

Commit 8baf566

Browse files
committed
improve committing of performance.md
1 parent 89c79c6 commit 8baf566

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/performance-test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,12 @@ jobs:
230230
run: |
231231
git config --local user.email "action@github.com"
232232
git config --local user.name "GitHub Action"
233+
BRANCH="${{ github.head_ref || github.ref_name }}"
234+
# Fetch latest branch, reset to it, then apply only performance.md
235+
cp performance.md /tmp/performance.md
236+
git fetch origin "$BRANCH"
237+
git reset --hard "origin/$BRANCH"
238+
cp /tmp/performance.md performance.md
233239
git add performance.md
234240
git diff --staged --quiet || git commit -m "Update performance test results [skip ci]"
235-
BRANCH="${{ github.head_ref || github.ref_name }}"
236-
git pull --rebase origin "$BRANCH" || true
237241
git push origin HEAD:"$BRANCH" || echo "Push failed — performance report not updated"

0 commit comments

Comments
 (0)