-
Notifications
You must be signed in to change notification settings - Fork 2k
60 lines (54 loc) · 1.79 KB
/
version-bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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-24.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@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
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.