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

Add github runner to release helm chart #7

Merged
merged 1 commit into from
Sep 30, 2024
Merged
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
55 changes: 55 additions & 0 deletions .github/workflows/chart-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release Charts

on:
push:
tags:
- 'v*.*.*'

jobs:
build:
name: Publish Helm Chart
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
CHART_NAME: bioscfg
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: ${{ env.CHART_NAME }}
fetch-depth: 0
-
name: Checkout Helm chart Repo
uses: actions/checkout@v4
with:
repository: metal-toolbox/${{ env.CHART_NAME }}
path: helm-charts
ref: gh-pages
fetch-depth: 0
Comment on lines +19 to +31
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing something? These look like the same step.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but what branch is it pulling?

We are going to push to that branch (gh-pages). then those tarball helmcharts are available to be pulled.

check out flipflop's for reference: https://github.com/metal-toolbox/flipflop/tree/gh-pages

-
name: Install Helm
uses: azure/[email protected]
-
name: Package Helm Chart
run: |
helm package --version ${{ github.ref_name }} ./${{ env.CHART_NAME }}/chart -u -d ./helm-charts/
helm repo index ./helm-charts/ --url https://metal-toolbox.github.io/${{ env.CHART_NAME }}/
-
name: Create Git Commit
run: |
cd helm-charts
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add index.yaml *.tgz
git commit -m "published ${{ env.CHART_NAME }}-${{ github.ref_name }}.tgz"
-
name: Push Changes
uses: ad-m/github-push-action@master
with:
repository: metal-toolbox/${{ env.CHART_NAME }}
directory: helm-charts
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
Loading