Compare commits

...

1 Commits

Author SHA1 Message Date
dd066d4c42 Fixing auto-checkout issues
All checks were successful
Merge-Checker / build_and_test (pull_request) Successful in 22s
2025-05-21 18:35:47 -04:00

View File

@@ -50,18 +50,34 @@ jobs:
exit 1
fi
- name: Commit and push timing results
if: github.event.pull_request.head.repo.full_name == github.repository # Only push from same repo
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
git config --global user.name "ci-bot"
git config --global user.email "ci-bot@local"
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
git stash
echo "Checking out source branch $BRANCH_NAME"
git fetch origin "$BRANCH_NAME"
git checkout "$BRANCH_NAME"
git pull
echo "Checking if last commit was a timing update"
LAST_COMMIT_MSG=$(git log -1 --pretty=%B)
if echo "$LAST_COMMIT_MSG" | grep -q "Update matrix-timing-tests timings"; then
echo "Last commit was a timing update, skipping commit."
exit 0
else
echo "Last commit name was: $LAST_COMMIT_MSG"
git stash pop
fi
git add unit-tests/timing-results/matrix-timing-tests.txt
if git diff --quiet --cached; then
echo "No changes to commit"
else
git commit -m "Update matrix-timing-tests timings [skip ci]"
git push origin HEAD:$BRANCH_NAME
fi
git push origin "$BRANCH_NAME"
fi