Skip to content

Commit

Permalink
Test run of new chart releaser code
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeschuurmans committed Jun 27, 2024
1 parent 93d3053 commit 735f1c6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
46 changes: 34 additions & 12 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,52 @@ name: Release Charts

on:
push:
tags:
- 'v*.*.*'
branch:
- FS-1428

jobs:
build:
name: Publish Helm Chart
runs-on: ubuntu-latest
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:
repository: jakeschuurmans/helm-chart-test
path: helm-chart
token: ${{ secrets.GITHUB_TOKEN }}
-
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://jakeschuurmans.github.io/helm-chart-test
-
name: Publish Helm Chart
run: |
cd helm-chart
ls -la
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
-
name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: .
config:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NAME_TEMPLATE: "helm-chart-{{ .Version }}"
git add index.yaml *.tgz
git commit -m "published ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz"
git push origin gh-pages
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release Fleet-Scheduler

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: fleet-scheduler
description: A chart for fleet scheduled cron jobs
version: 1.0.1
version: VERSION # To be updated by github action when tag is created
keywords:
- cron
home: "https://github.com/metal-toolbox/fleet-scheduler"
Expand Down

0 comments on commit 735f1c6

Please sign in to comment.