create_release_pull_request #48
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 | |
init_container_version: | |
description: 'Which init container version are we creating a release pull request for?' | |
required: true | |
default: v0.3.0 | |
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-latest | |
steps: | |
- name: validate version | |
run: | | |
echo "${{ github.event.inputs.release_version }}" | grep -E 'v[0-9]+\.[0-9]+\.[0-9]+$' | |
echo "${{ github.event.inputs.init_container_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]+\.[0-9]+-[0-9]+\.[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 }}" | |
INIT_IMG_TAG: "${{ github.event.inputs.init_container_version }}" | |
- name: Create release pull request | |
uses: peter-evans/create-pull-request@v6 | |
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 }}-${{ github.event.inputs.init_container_version }}" | |
base: ${{ github.event.inputs.based_on_branch }} |