Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce helm chart automatic release workflow #269

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/configs/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pages-branch: gh-pages
release-name-template: "v{{ .Version }}"
release-notes-file: CHANGELOG.md
56 changes: 56 additions & 0 deletions .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release Helm Chart

on:
push:
branches:
- main
paths:
- 'helm/**'

jobs:
release:
if: false
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Helm
if: true
uses: azure/setup-helm@v3
with:
token: ${{ github.token }}

- name: Add dependencies
if: true
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami

- name: Configure git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

- name: Semantic Release
id: semantic-release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
semantic_version: 19.0.5
branch: main
extra_plugins: |
semantic-release-helm3@2.9.3

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: helm
config: .github/configs/cr.yaml
skip_existing: true
20 changes: 20 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ github.token }}
39 changes: 39 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"branches": ["main"],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"writerOpts": {
"commitsSort": ["subject", "scope"]
}
}
],
[
'@semantic-release/changelog',
{
"changelogFile": 'helm/flowforge/CHANGELOG.md'
}
],
[
'semantic-release-helm3',
{
chartPath: 'helm/flowforge',
onlyUpdateVersion: true
}
]
]
}
Loading