Skip to content

Commit

Permalink
fix: change release workflow [skip ci] (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ialejandro authored Aug 14, 2024
1 parent 6788e8d commit 7c380bb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .github/updatecli/helm-appversion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
sources:
steampipe:
kind: dockerimage
spec:
image: turbot/steampipe
architecture: linux/amd64
versionfilter:
kind: semver
conditions: {}
targets:
chartVersion:
name: bump appversion
kind: yaml
spec:
file: charts/Chart.yaml
key: $.appVersion
26 changes: 14 additions & 12 deletions .github/workflows/check-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,32 @@ jobs:
with:
fetch-depth: 0

- name: Get latest release
id: latest_release
run: |
latest_release=$(curl -s https://api.github.com/repos/turbot/steampipe/releases | jq -r '.[0].name')
echo "latest_release=$latest_release" >> $GITHUB_OUTPUT
- name: Get current release
id: current_release
run: |
current_release=$(grep appVersion charts/Chart.yaml | awk '{ print $2 }')
echo "current_release=$current_release" >> $GITHUB_OUTPUT
- name: Install updatecli
uses: updatecli/updatecli-action@v2

- name: Update dependencies
run: |
updatecli apply --config .github/updatecli/helm-appversion.yaml --commit=false
- name: Get latest release
id: latest_release
run: |
latest_release=$(grep appVersion charts/Chart.yaml | awk '{ print $2 }')
echo "latest_release=$latest_release" >> $GITHUB_OUTPUT
- name: Check if release changed
id: check_changes
run: |
if [ ${{ steps.latest_release.outputs.latest_release }} != ${{ steps.current_release.outputs.current_release }} ]; then
echo "release_changed=true" >> $GITHUB_OUTPUT
fi
- name: Set new Chat.yaml appVersion
if: steps.check_changes.outputs.release_changed == 'true'
run: |
sed -i "s/appVersion: .*/appVersion: ${{ steps.latest_release.outputs.latest_release }}/g" charts/Chart.yaml
- name: Update README.md Helm Chart
if: steps.check_changes.outputs.release_changed == 'true'
uses: losisin/helm-docs-github-action@v1
Expand All @@ -59,7 +61,7 @@ jobs:
- :information_source: Current: `${{ steps.current_release.outputs.current_release }}`
- :up: Upgrade: `${{ steps.latest_release.outputs.latest_release }}`
Changelog: https://api.github.com/repos/turbot/steampipe/releases/tag/${{ steps.latest_release.outputs.latest_release }}
Changelog: https://github.com/turbot/steampipe/releases/tag/v${{ steps.latest_release.outputs.latest_release }}
labels: |
auto-pr-bump-version
team-reviewers: devops-ia
2 changes: 1 addition & 1 deletion charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: steampipe
description: A Helm chart for Kubernetes to deploy Steampipe
type: application
version: 1.0.0
appVersion: "0.22.0"
appVersion: 0.22.0
home: https://github.com/devops-ia/helm-steampipe
sources:
- https://github.com/turbot/steampipe
Expand Down

0 comments on commit 7c380bb

Please sign in to comment.