From 3876c6bec24fcea2ea2d8d9b193218a320fc10ef Mon Sep 17 00:00:00 2001 From: reggie-k Date: Thu, 19 Sep 2024 14:17:15 +0300 Subject: [PATCH] test pr creation Signed-off-by: reggie-k --- .github/workflows/reggie-create-pr.yaml | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/reggie-create-pr.yaml diff --git a/.github/workflows/reggie-create-pr.yaml b/.github/workflows/reggie-create-pr.yaml new file mode 100644 index 0000000000000..8d85bde9476b3 --- /dev/null +++ b/.github/workflows/reggie-create-pr.yaml @@ -0,0 +1,42 @@ +name: Create PR +on: + workflow_dispatch: + inputs: + TARGET_BRANCH: + description: 'TARGET_BRANCH to checkout (e.g. release-2.5)' + required: true + type: string + TARGET_VERSION: + description: 'TARGET_VERSION to build manifests (e.g. 2.5.0-rc1) Note: the `v` prefix is not used' + required: true + type: string +permissions: {} +jobs: + prepare-release: + permissions: + contents: write # for peter-evans/create-pull-request to create branch + pull-requests: write # for peter-evans/create-pull-request to create a PR + name: Automatically generate version and manifests on release-2.5 + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + ref: ${{ inputs.TARGET_BRANCH }} + - name: Create VERSION information + run: | + set -ue + echo "Bumping version from $(cat VERSION) to ${{ inputs.TARGET_VERSION }}" + echo "${{ inputs.TARGET_VERSION }}" > VERSION + - name: Create pull request + uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0 + with: + commit-message: "Bump version to ${{ inputs.TARGET_VERSION }}" + title: "Bump version to ${{ inputs.TARGET_VERSION }} on ${{ inputs.TARGET_BRANCH }} branch" + body: Updating VERSION and manifests to ${{ inputs.TARGET_VERSION }} + branch: update-version + branch-suffix: random + signoff: true + labels: release \ No newline at end of file