Bump the IC & Helm chart version #6
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: "Bump the IC & Helm chart version" | |
on: | |
workflow_dispatch: | |
inputs: | |
source_branch: | |
required: true | |
type: string | |
default: "main" | |
ic_version: | |
required: true | |
type: string | |
default: "0.0.0" | |
helm_chart_version: | |
required: true | |
type: string | |
default: "0.0.0" | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
jobs: | |
version-bump: | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
ref: ${{ inputs.source_branch }} | |
- name: Replace Versions | |
run: | | |
yq -i e '.version = env(CHART_VERSION) | .appVersion = env(IC_VERSION)' charts/nginx-ingress/Chart.yaml | |
cat charts/nginx-ingress/Chart.yaml | |
cat > .github/data/version.txt << EOF | |
IC_VERSION=${IC_VERSION} | |
HELM_CHART_VERSION=${CHART_VERSION} | |
EOF | |
cat .github/data/version.txt | |
env: | |
IC_VERSION: ${{ inputs.ic_version }} | |
CHART_VERSION: ${{ inputs.helm_chart_version }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 | |
with: | |
token: ${{ secrets.NGINX_PAT }} | |
commit-message: Version Bump for ${{ github.event.inputs.ic_version }} | |
title: Version Bump for ${{ github.event.inputs.ic_version }} | |
branch: chore/version-bump-${{ github.event.inputs.ic_version }} | |
author: nginx-bot <[email protected]> | |
labels: chore | |
body: | | |
This automated PR updates the NIC & Helm chart versions for the upcoming ${{ github.event.inputs.ic_version }} release. |