You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use PR for openstack-k8s-operators-ci workflow updates
Change the 'Update openstack-k8s-operators-ci workflows' step to create
a pull request instead of directly committing to main branch. This follows
the same pattern as the openstack-operator update step.
Changes:
- Create a feature branch for the force-bump-branches.yaml update
- Check if changes were made before creating PR
- Create PR with descriptive title and body
- Respect DRY_RUN mode
- Use retry logic for git push operations
- Remove direct commit to main branch
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
git commit -m "ci: Update force-bump-branches for ${BRANCH_NAME}"
757
+
758
+
# Push the branch
759
+
echo "Pushing branch ${PR_BRANCH}..."
760
+
if ! retry_command 3 5 "Pushing branch ${PR_BRANCH}" git push origin "${PR_BRANCH}"; then
761
+
echo "::error::Failed to push branch ${PR_BRANCH}"
762
+
exit 1
763
+
fi
764
+
765
+
# Create pull request using GitHub CLI
766
+
echo "Creating pull request..."
767
+
PR_BODY="This PR updates the force-bump-branches workflow to include the ${BRANCH_NAME} branch."$'\n\n'"Changes included:"$'\n'"- Update force-bump-branches.yaml matrix to: ${FORCE_BUMP_BRANCHES}"$'\n\n'"Generated automatically by the create-release-branch workflow."
768
+
PR_URL=$(gh pr create \
769
+
--title "ci: Update force-bump-branches for ${BRANCH_NAME}" \
770
+
--body "${PR_BODY}" \
771
+
--base main \
772
+
--head "${PR_BRANCH}" \
773
+
--repo "${ORG_NAME}/openstack-k8s-operators-ci")
774
+
775
+
if [ $? -ne 0 ]; then
776
+
echo "::error::Failed to create pull request"
777
+
exit 1
778
+
fi
779
+
780
+
echo "✅ Pull request created successfully: ${PR_URL}"
781
+
fi
782
+
else
783
+
echo "No changes detected in openstack-k8s-operators-ci. Skipping pull request creation."
784
+
fi
718
785
719
786
cd .. && rm -rf "$TEMP_DIR"
720
-
echo "Workflow finished."
721
787
722
788
retag-and-push-rabbitmq-cluster-operator-index:
723
789
# Only run if not a dry run, parameter is enabled, and create-branches job succeeded
0 commit comments