Skip to content
Snippets Groups Projects
Unverified Commit 47cc5995 authored by Maksym H's avatar Maksym H Committed by GitHub
Browse files

fix cmd detached commit (#5672)

return the repo/ref as .sha creates detached branch and doesn't let to
push back the changes
parent ea5fb02e
No related merge requests found
Pipeline #496586 waiting for manual action with stages
in 38 minutes and 37 seconds
......@@ -146,8 +146,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get command
uses: actions-ecosystem/action-regex-match@v2
......@@ -333,7 +331,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ needs.get-pr-branch.outputs.repo }}
ref: ${{ needs.get-pr-branch.outputs.pr-branch }}
- name: Install dependencies for bench
if: startsWith(steps.get-pr-comment.outputs.group2, 'bench')
......@@ -360,10 +359,12 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git pull --rebase origin ${{ needs.get-pr-branch.outputs.pr-branch }}
git add .
git restore --staged Cargo.lock # ignore changes in Cargo.lock
git commit -m "Update from ${{ github.actor }} running command '${{ steps.get-pr-comment.outputs.group2 }}'" || true
git pull --rebase origin ${{ needs.get-pr-branch.outputs.pr-branch }}
git push origin ${{ needs.get-pr-branch.outputs.pr-branch }}
else
echo "Nothing to commit";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment