File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,16 +226,10 @@ jobs:
226226 cat performance.md >> $GITHUB_STEP_SUMMARY
227227
228228 - name : Commit and Push Performance Report
229- if : always()
229+ if : always() && github.ref == 'refs/heads/main'
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
239233 git add performance.md
240234 git diff --staged --quiet || git commit -m "Update performance test results [skip ci]"
241- git push origin HEAD:"$BRANCH" || echo "Push failed — performance report not updated"
235+ git push origin HEAD:main
You can’t perform that action at this time.
0 commit comments