diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4be08ed4f4..b245aff5d2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,6 +9,7 @@ on: pull_request: branches: - master + - 'release-v*' env: GO_VERSION: 1.22.4 diff --git a/.github/workflows/build_tool.yaml b/.github/workflows/build_tool.yaml index 49270b16d5..4a34a9a94f 100644 --- a/.github/workflows/build_tool.yaml +++ b/.github/workflows/build_tool.yaml @@ -4,6 +4,7 @@ on: pull_request: branches: - master + - 'release-v*' paths: - tool/** diff --git a/.github/workflows/cherry_pick.yaml b/.github/workflows/cherry_pick.yaml new file mode 100644 index 0000000000..50e14ddbaf --- /dev/null +++ b/.github/workflows/cherry_pick.yaml @@ -0,0 +1,25 @@ +name: cherry_pick + +on: + workflow_dispatch: + inputs: + releaseBranch: + description: 'release branch (e.g. release-v0.48.x)' + required: true + type: string + version: + description: 'release version (e.g. v0.48.1)' + required: true + type: string +jobs: + tool: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: make a cherry-pick PR + run: | + git config user.name "pipecd-bot" + git config user.email "pipecd.dev@gmail.com" + ./hack/cherry-pick.sh -q ${{ inputs.releaseBranch }} $(gh pr list --label cherry-pick --label ${{ inputs.version }} --state merged | awk '{print $1}' | sort | paste -sd ' ' -) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d0232c9937..a7c379804d 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -7,6 +7,7 @@ on: pull_request: branches: - master + - 'release-v*' env: GO_VERSION: 1.22.4 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a3da2c1d96..689441457f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,6 +9,7 @@ on: pull_request: branches: - master + - 'release-v*' env: GO_VERSION: 1.22.4 diff --git a/.github/workflows/test_tool.yaml b/.github/workflows/test_tool.yaml index 9a1bbd97c7..bb617d10cd 100644 --- a/.github/workflows/test_tool.yaml +++ b/.github/workflows/test_tool.yaml @@ -9,6 +9,7 @@ on: pull_request: branches: - master + - 'release-v*' paths: - tool/** diff --git a/hack/cherry-pick.sh b/hack/cherry-pick.sh index 8dd43eb205..877a9efd88 100755 --- a/hack/cherry-pick.sh +++ b/hack/cherry-pick.sh @@ -76,7 +76,7 @@ echo # Cherry-pick pull requests COMMITS=$(join " " "${COMMIT_HASHS[@]}") echo "+++ Cherry-picking pull requests" -git cherry-pick ${COMMITS} +git cherry-pick -s ${COMMITS} echo # Check whether to push commits and create a pull request or not