-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8470afb
commit 953920a
Showing
3 changed files
with
89 additions
and
2 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,85 @@ | ||
name: Helm | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'deploy/chart/**' | ||
pull_request: | ||
paths: | ||
- 'deploy/chart/**' | ||
workflow_dispatch: {} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
helm-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Version | ||
run: | | ||
TAG=$(git describe --tags --abbrev=0) | ||
sed -ie "s/appVersion: \"latest\"/appVersion: ${TAG#v}/g" deploy/chart/Chart.yaml | ||
sed -ie "s/version: 0.0.0/version: ${TAG#v}/g" deploy/chart/Chart.yaml | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
check-latest: true | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --check-version-increment=false --chart-dirs deploy --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
# we cannot test a helm install without a valid linode | ||
# - name: Create kind cluster | ||
# uses: helm/[email protected] | ||
|
||
#- name: Run chart-testing (install) | ||
# run: ct install --chart-dirs helm-chart --namespace kube-system --helm-extra-set-args "--set=apiToken=test --set=region=us-east" --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
helm-release: | ||
if: github.ref == 'refs/heads/main' | ||
needs: helm-test | ||
permissions: | ||
contents: write # for helm/chart-releaser-action to push chart release and create a release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Version | ||
run: | | ||
TAG=$(git describe --tags --abbrev=0) | ||
sed -ie "s/appVersion: \"latest\"/appVersion: ${TAG#v}/g" deploy/chart/Chart.yaml | ||
sed -ie "s/version: 0.0.0/version: ${TAG#v}/g" deploy/chart/Chart.yaml | ||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
charts_dir: deploy | ||
skip_existing: true |
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