-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update create_release workflow * chore: update create_release workflow
- Loading branch information
Showing
1 changed file
with
26 additions
and
12 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 |
---|---|---|
|
@@ -29,6 +29,11 @@ on: | |
description: Is this release latest | ||
required: true | ||
default: true | ||
bump_chart: | ||
type: boolean | ||
description: Bump chart version and commit | ||
required: true | ||
default: true | ||
|
||
permissions: | ||
contents: write | ||
|
@@ -88,13 +93,6 @@ jobs: | |
echo "Chart releaser installed at ${{env.CR_BIN_PATH}}" | ||
- name: Update chart version | ||
uses: mikefarah/yq@master | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
with: | ||
cmd: yq e -i '.version = env(VERSION)' ${{ env.CHART_DIR }}/Chart.yaml | ||
|
||
- name: Setup ConduktorBot GPG | ||
id: gpg | ||
uses: crazy-max/[email protected] | ||
|
@@ -104,15 +102,31 @@ jobs: | |
git_commit_gpgsign: true | ||
git_tag_gpgsign: true | ||
|
||
- name: Commit chart version update | ||
id: commit | ||
- name: Setup git config | ||
run: | | ||
git config user.name "${{ steps.gpg.outputs.name }}" | ||
git config user.email "${{ steps.gpg.outputs.email }}" | ||
git diff | ||
git commit -am "Update chart ${{ inputs.chart }} version to ${{ inputs.version }}" | ||
git push | ||
- name: Update chart version | ||
if: ${{ inputs.bump_chart }} | ||
uses: mikefarah/yq@master | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
with: | ||
cmd: yq e -i '.version = env(VERSION)' ${{ env.CHART_DIR }}/Chart.yaml | ||
|
||
- name: Commit chart version update | ||
id: commit | ||
run: | | ||
if ${{ inputs.bump_chart }}; then | ||
echo "Bumping chart version" | ||
git add ${{ env.CHART_DIR }}/Chart.yaml | ||
git diff | ||
git commit -am "Update chart ${{ inputs.chart }} version to ${{ inputs.version }}" | ||
git push | ||
else | ||
echo "Not bumping chart version" | ||
fi | ||
update_commit=$(git rev-parse HEAD) | ||
echo "commit_sha1=${update_commit}" >> "${GITHUB_OUTPUT}" | ||
|