Skip to content

update chart version and open pr #17

update chart version and open pr

update chart version and open pr #17

Workflow file for this run

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.