-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHORE] adding workflow to update helm on new tag (#57)
Signed-off-by: Nicolas Takashi <nicolas.takashi@coralogix.com>
- Loading branch information
1 parent
9ad7c19
commit d6e8d51
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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=$(echo "${{ github.event.ref }}" | sed -n 's/refs\/tags\/v\(.*\)/\1/p') | ||
CURRENT_VERSION=$(grep "version:" charts/coralogix-operator/Chart.yaml | awk '{print $2}') | ||
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS=. '{$3+=1}1') | ||
git checkout -b update-chart-version-${TAG} | ||
sed -i "s/appVersion:.*/appVersion: $TAG/" charts/coralogix-operator/Chart.yaml | ||
sed -i "s/version:.*/version: $NEW_VERSION/" charts/coralogix-operator/Chart.yaml | ||
git add charts/coralogix-operator/Chart.yaml | ||
git commit -m "Bump version and update appVersion in Chart.yaml" | ||
git push origin update-chart-version-${TAG} | ||
- 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" | ||
branch: update-chart-version-${TAG} | ||
body: | | ||
This pull request bumps the version and updates the appVersion in Chart.yaml to match the tag. |