Skip to content

Commit

Permalink
fix cmd detached commit (paritytech#5672)
Browse files Browse the repository at this point in the history
return the repo/ref as .sha creates detached branch and doesn't let to
push back the changes
  • Loading branch information
mordamax committed Sep 11, 2024
1 parent ea5fb02 commit 47cc599
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand All @@ -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";
Expand Down

0 comments on commit 47cc599

Please sign in to comment.