Skip to content

Enable PR creation in upgrade workflows for Java and Tomcat.#1268

Open
duanemay wants to merge 1 commit into
developfrom
upgrade-workflow-pr
Open

Enable PR creation in upgrade workflows for Java and Tomcat.#1268
duanemay wants to merge 1 commit into
developfrom
upgrade-workflow-pr

Conversation

@duanemay

@duanemay duanemay commented Jul 3, 2026

Copy link
Copy Markdown
Member

Fix #1262

⏺ Both workflows now create a feature branch (Java-
or Tomcat-) and open a PR instead of pushing
directly:

  • upgrade-java.yml: added pull-requests: write permission,
    creates branch Java-${JDK_VERSION}, pushes it, then runs gh
    pr create.
  • upgrade-tomcat.yml: added pull-requests: write permission,
    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.

Copilot AI review requested due to automatic review settings July 3, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: write permission to both upgrade workflows.
  • Create versioned branches (Java-<version>, Tomcat-<version>) and push them to origin.
  • Create upgrade PRs via gh pr create after 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}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Fix GH to update tomcat (maybe update has same issue).

2 participants