-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (35 loc) · 1.45 KB
/
helm-update.yaml
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
name: update chart version and open pr
on:
create:
tags:
- "v*"
jobs:
update-chart-version:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Update Chart Version
run: |
TAG="${{ github.ref_name }}"
TAG_VERSION=$(echo $TAG | sed 's/v//')
CURRENT_VERSION=$(grep "version:" charts/coralogix-operator/Chart.yaml | awk '{print $2}')
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS=. '{$3+=1}1')
sed -i "s/appVersion:.*/appVersion: $TAG_VERSION/" charts/coralogix-operator/Chart.yaml
sed -i "s/version:.*/version: $NEW_VERSION/" charts/coralogix-operator/Chart.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Bump version and update appVersion in Chart.yaml"
title: "Bump version and update appVersion in Chart.yaml"
base: main
branch: update-chart-version-${{ github.ref_name }}
add-paths: |
charts/coralogix-operator/Chart.yaml
body: |
This pull request bumps the version and updates the appVersion in Chart.yaml to match the tag.