-
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.
- Loading branch information
1 parent
93d3053
commit 4e58ad0
Showing
3 changed files
with
42 additions
and
12 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 |
---|---|---|
|
@@ -2,30 +2,60 @@ name: Release Charts | |
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
branch: | ||
- FS-1428 | ||
|
||
jobs: | ||
build: | ||
name: Publish Helm Chart | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
env: | ||
CHART_DIR: chart | ||
CHART_REPO: metal-toolbox/fleet-scheduler | ||
CHART_NAME: fleet-scheduler | ||
CHART_REPO_BRANCH: main | ||
CHART_VERSION: 0.0.3 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.CHART_NAME }} | ||
fetch-depth: 0 | ||
- | ||
name: Configure Git | ||
name: Checkout Helm chart Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: helm-chart | ||
ref: gh-pages | ||
fetch-depth: 0 | ||
- | ||
name: Install Helm | ||
uses: azure/[email protected] | ||
- | ||
name: Install yq | ||
uses: mikefarah/[email protected] | ||
- | ||
name: Package Helm Chart | ||
run: | | ||
sed -i "s/VERSION/${{ env.CHART_VERSION }}/g" ./${{ env.CHART_NAME }}/chart/Chart.yaml | ||
helm package ./${{ env.CHART_NAME }}/chart -u -d ./helm-chart/ | ||
helm repo index ./helm-chart/ --url https://metal-toolbox.github.io/fleet-scheduler/ | ||
- | ||
name: Create Git Commit | ||
run: | | ||
cd helm-chart | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
git add index.yaml *.tgz | ||
git commit -m "published ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz" | ||
- | ||
name: Run chart-releaser | ||
uses: helm/chart-releaser-action@v1.6.0 | ||
name: Push Changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
charts_dir: . | ||
config: | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}" | ||
directory: helm-chart | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: release | ||
name: Release Fleet-Scheduler | ||
|
||
on: | ||
push: | ||
|
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