Skip to content

Commit

Permalink
Update release workflow (#141)
Browse files Browse the repository at this point in the history
* chore: update create_release workflow

* chore: update create_release workflow
  • Loading branch information
qboileau authored Nov 28, 2024
1 parent e1cc8f4 commit 6ee97b8
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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}"
Expand Down

0 comments on commit 6ee97b8

Please sign in to comment.