Skip to content

Commit

Permalink
Update cmd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax committed Aug 29, 2024
1 parent af5341c commit 99b2c57
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,8 @@ jobs:
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
# 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
git push origin ${{ github.event.issue.pull_request.head.ref }}
else
echo "Nothing to commit";
fi
Expand Down

0 comments on commit 99b2c57

Please sign in to comment.