Skip to content

Commit

Permalink
Merge branch 'main' into mordamax-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax authored Aug 29, 2024
2 parents eb58c98 + 761ff39 commit 660702f
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:

- name: Load fellows
id: load-fellows
uses: paritytech/[email protected]
#uses: paritytech/[email protected]
run: echo "github-handles=[mordamax]" >> $GITHUB_OUTPUT

reject-non-fellows:
needs: fellows
Expand Down Expand Up @@ -137,7 +138,13 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `<details><summary>Command help:</summary>${{ steps.help.outputs.help }}</details>`
body: `<details><summary>Command help:</summary>
\`\`\`
${{ steps.help.outputs.help }}
\`\`\`
</details>`
})
- name: Add confused reaction on failure
Expand Down Expand Up @@ -225,7 +232,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
ref: ${{ github.event.issue.pull_request.head.ref }}

- name: Set rust version via common env file
run: cat .github/env >> $GITHUB_ENV
Expand Down Expand Up @@ -268,11 +275,18 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull origin ${{ github.head_ref }}
git pull origin ${{ github.event.issue.pull_request.head.ref }}
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 push origin ${{ github.head_ref }}
# Check if this is a fork
if [ "${{ github.repository.owner.login }}" != "${{ github.event.repository.owner.login }}" ]; then
echo "Running on a fork, pushing to forked repo";
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.repository.owner.login }}/${{ github.repository }}.git ${{ github.event.issue.pull_request.head.ref }}
else
echo "Running on the main repo, pushing to the original repo";
git push origin ${{ github.event.issue.pull_request.head.ref }}
fi
else
echo "Nothing to commit";
fi
Expand Down

0 comments on commit 660702f

Please sign in to comment.