create_release_pull_request #40
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
# https://github.com/Azure/azure-workload-identity/blob/main/.github/workflows/create-release-pull-request.yaml | |
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: master | |
permissions: | |
contents: write | |
pull-requests: write | |
actions: read | |
deployments: read | |
jobs: | |
create-release-pull-request: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: validate version | |
run: | | |
echo "${{ github.event.inputs.release_version }}" | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+$' | |
echo "${{ github.event.inputs.based_on_branch }}" | grep -E '^(master|release-[0-9]+\.[0-9]+)$' | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
ref: "${{ github.event.inputs.based_on_branch }}" | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: update release manifest | |
run: make release-manifest | |
env: | |
VERSION: "${{ github.event.inputs.release_version }}" | |
- name: Create release pull request | |
uses: peter-evans/create-pull-request@v5 | |
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 }} |