Enable PR creation in upgrade workflows for Java and Tomcat.#1268
Open
duanemay wants to merge 1 commit into
Open
Enable PR creation in upgrade workflows for Java and Tomcat.#1268duanemay wants to merge 1 commit into
duanemay wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the scheduled Java and Tomcat upgrade GitHub Actions to avoid pushing directly to protected branches by creating versioned feature branches and opening pull requests instead.
Changes:
- Add
pull-requests: writepermission to both upgrade workflows. - Create versioned branches (
Java-<version>,Tomcat-<version>) and push them to origin. - Create upgrade PRs via
gh pr createafter pushing the branch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/upgrade-tomcat.yml | Pushes Tomcat upgrades to a versioned branch and opens a PR instead of pushing to the default branch. |
| .github/workflows/upgrade-java.yml | Pushes Java upgrades to a versioned branch and opens a PR instead of pushing to the default branch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
47
to
+49
| env: | ||
| TOMCAT_VERSION: ${{ matrix.tomcat }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Comment on lines
+94
to
+97
| BRANCH_NAME="Tomcat-${LATEST_TOMCAT_VERSION}" | ||
| git checkout -b "${BRANCH_NAME}" | ||
| git commit -m "Upgrade Tomcat to version $LATEST_TOMCAT_VERSION" | ||
| git push | ||
| git push -u origin "${BRANCH_NAME}" |
Comment on lines
+91
to
+94
| BRANCH_NAME="Java-${JDK_VERSION}" | ||
| git checkout -b "${BRANCH_NAME}" | ||
| git commit -m "Upgrade Bellsoft JDK to version ${JDK_VERSION}" | ||
| git push | ||
| git push -u origin "${BRANCH_NAME}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1262
⏺ Both workflows now create a feature branch (Java-
or Tomcat-) and open a PR instead of pushing
directly:
creates branch Java-${JDK_VERSION}, pushes it, then runs gh
pr create.
added GITHUB_TOKEN to the step's env (needed for gh),
creates branch Tomcat-${LATEST_TOMCAT_VERSION}, pushes it,
then runs gh pr create.
PR base is left unset so gh defaults to the repo's default
branch, matching whatever ref the scheduled workflow checked
out.