-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/helm-workflow'
This merge pulls in the addition of a github workflow that should have been included in the last release. It also models a slightly simplified git workflow by leaving out the intermediary step of a devel branch. Also included is a version bump 0.0.5->0.0.6 Signed-off-by: Adam McCartney <adam@mur.at>
- Loading branch information
Showing
6 changed files
with
60 additions
and
5 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,55 @@ | ||
name: Helm-Release | ||
|
||
on: [ release ] | ||
|
||
## REF: https://faun.pub/semantic-version-of-helm-charts-in-github-actions-using-conventional-commits-ce5e0a587ce8 | ||
jobs: | ||
publish-helm-chart: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source code # Checkout source code | ||
uses: 'actions/checkout@v2' | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
|
||
- name: Get specific changed files # To check if any files changed in charts/ots directory | ||
id: changed-files-specific | ||
uses: tj-actions/changed-files@v14.5 | ||
with: | ||
since_last_remote_commit: true | ||
files: | | ||
Charts/pacman/* | ||
- name: Automated Version Bump # Bump version in package.json | ||
if: steps.changed-files-specific.outputs.any_modified == 'true' | ||
id: version-bump | ||
uses: 'phips28/gh-action-bump-version@master' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PACKAGEJSON_DIR: 'Charts/pacman' | ||
with: | ||
skip-tag: 'true' | ||
commit-message: 'CI: Bump Helm chart version to {{version}}' | ||
|
||
- name: update Chart.yaml # Update chart.yaml with new version and other fields | ||
if: steps.changed-files-specific.outputs.any_modified == 'true' | ||
working-directory: Charts/pacman | ||
run: | | ||
sed -i'.oldVersion' -e "/^version:/s;[^ ]*$;${{ steps.version-bump.outputs.newTag }};" Chart.yaml | ||
sed -i'.oldAppVersion' -e "/^appVersion:/s;[^ ]*$;${{ steps.version-bump.outputs.newTag }};" Chart.yaml | ||
- name: commit the new Chart.yml # commit the new Chart.yaml to main branch | ||
if: steps.changed-files-specific.outputs.any_modified == 'true' | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Automated Change | ||
|
||
- name: Run chart-releaser | ||
if: steps.changed-files-specific.outputs.any_modified == 'true' | ||
uses: helm/chart-releaser-action@v1.4.0 | ||
with: | ||
charts_dir: Charts | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
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
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
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
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
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