-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve workflows [skip ci] (#8)
* Add OCI package * Add semantic-release Closes #6
- Loading branch information
1 parent
096c225
commit 9700e97
Showing
4 changed files
with
163 additions
and
3 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,65 @@ | ||
name: Check Steampipe new releases | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
check-and-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
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: 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 | ||
with: | ||
chart-search-root: charts | ||
|
||
- name: Create PR with changes | ||
if: steps.check_changes.outputs.release_changed == 'true' | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.PAT_GITHUB }} | ||
commit-message: "fix: update Steampipe version to ${{ steps.latest_release.outputs.latest_release }}" | ||
signoff: false | ||
branch: fix/upgrade-steampipe-appversion-${{ steps.latest_release.outputs.latest_release }} | ||
delete-branch: true | ||
title: '[steampipe] new release: ${{ steps.latest_release.outputs.latest_release }}' | ||
body: | | ||
Steampipe version: | ||
- :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 }} | ||
labels: | | ||
auto-pr-bump-version | ||
team-reviewers: devops-ia |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "helm-steampipe", | ||
"version": "1.0.0", | ||
"release": { | ||
"branches": [ | ||
"main" | ||
], | ||
"repositoryUrl": "https://github.com/devops-ia/helm-steampipe.git", | ||
"plugins": [ | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github" | ||
] | ||
} | ||
} |