From 6ee8083226d48b6266000e94b88e5cea4c50cacd Mon Sep 17 00:00:00 2001 From: Derek Su Date: Thu, 12 Nov 2026 10:02:21 +0800 Subject: [PATCH] chore: add workflow to update Go modules and create PR This workflow automates the process of updating Go modules, validating inputs, and creating a pull request with the changes. Renovate only updates dependencies when new tags are published in the corresponding repositories. This limitation leads to two challenges: - Members still need to manually update dependencies before moving their PRs to the testing stage. - During the release cycle, the two-week minimumReleaseAge requirement prevents timely module updates. To address these challenges, this workflow is introduced to allow team members to manually update dependencies when needed, without waiting for Renovate's automated updates. Signed-off-by: Derek Su --- .github/workflows/update-go-module.yml | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update-go-module.yml diff --git a/.github/workflows/update-go-module.yml b/.github/workflows/update-go-module.yml new file mode 100644 index 00000000..14095a7d --- /dev/null +++ b/.github/workflows/update-go-module.yml @@ -0,0 +1,30 @@ +name: Update Go Module + +on: + workflow_dispatch: + inputs: + branch: + description: "Base branch to update (e.g. master, v1.11.x)" + required: true + default: master + type: string + package: + description: "go.mod package to update (e.g. github.com/longhorn/go-common-libs)" + required: true + type: string + version: + description: "Target version, tag, branch or commit SHA (e.g. v1.2.3 or a commit hash)" + required: true + type: string + +permissions: + contents: read + +jobs: + update: + uses: longhorn/longhorn/.github/workflows/update-go-module.yml@master + with: + branch: ${{ inputs.branch }} + package: ${{ inputs.package }} + version: ${{ inputs.version }} + secrets: inherit