Skip to content

Commit

Permalink
generate_recipes.yml: Add --set-upstream to git push
Browse files Browse the repository at this point in the history
The GitHub CLI command had a regression where it fails when trying to
create a pull request:

  aborted: you must first push the current branch to a remote, or use the --head flag

This will be fixed in upstream releases. However, setting
--set-upstream on the git push command is reported to work around
this issue. (See cli/cli#10188)

Signed-off-by: Rob Woolley <[email protected]>
  • Loading branch information
robwoolley committed Jan 22, 2025
1 parent 337b428 commit 5070dfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/generate_recipes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
if [ "${CURRENT_BRANCH}" = "superflore/${ROS_DISTRO}/${ROS_DISTRO_RELEASE_DATE_ONLY}" ]; then
echo "Pushing to superflore/$GITHUB_REF_NAME/${ROS_DISTRO}/${ROS_DISTRO_RELEASE_DATE_ONLY}"
git branch -M superflore/$GITHUB_REF_NAME/${ROS_DISTRO}/${ROS_DISTRO_RELEASE_DATE_ONLY}
git push origin superflore/$GITHUB_REF_NAME/${ROS_DISTRO}/${ROS_DISTRO_RELEASE_DATE_ONLY}
git push --set-upstream origin superflore/$GITHUB_REF_NAME/${ROS_DISTRO}/${ROS_DISTRO_RELEASE_DATE_ONLY}
echo "Creating Pull Request"
gh pr create --title "Superflore Update for $GITHUB_REF_NAME : ${ROS_DISTRO} : ${ROS_DISTRO_RELEASE_DATE_ONLY}" --base $GITHUB_REF_NAME --fill-verbose
else
Expand Down

0 comments on commit 5070dfa

Please sign in to comment.