create_release_pull_request #17
This file contains 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
name: create_release_pull_request | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: 'Which version are we creating a release pull request for?' | |
required: true | |
based_on_branch: | |
description: 'Which branch should we base the release pull request on?' | |
required: true | |
default: main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
create-release-pull-request: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | |
with: | |
egress-policy: audit | |
- name: validate version | |
run: | | |
echo "${{ github.event.inputs.release_version }}" | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+(-alpha\.[0-9]+|-beta\.[0-9]+|-rc\.[0-9]+)?$' | |
echo "${{ github.event.inputs.based_on_branch }}" | grep -E '^(main|release-[0-9]+\.[0-9]+)$' | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
ref: "${{ github.event.inputs.based_on_branch }}" | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
- run: make release-manifest | |
env: | |
NEW_VERSION: "${{ github.event.inputs.release_version }}" | |
- run: make promote-staging-manifest | |
- name: Create release pull request | |
uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v5.0.1 | |
with: | |
commit-message: "release: update manifest and helm charts for ${{ github.event.inputs.release_version }}" | |
title: "release: update manifest and helm charts for ${{ github.event.inputs.release_version }}" | |
branch: "release-${{ github.event.inputs.release_version }}" | |
base: ${{ github.event.inputs.based_on_branch }} |