Merge pull request #1 from eth-cscs/v0.4.0 #9
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
name: Release Helm Chart | |
on: | |
push: | |
branches: | |
- main # Change this to your default branch if it's not 'main' | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.5.4 | |
- name: Build Helm dependencies | |
run: helm dependency build chart/ | |
- name: Package Helm chart | |
run: helm package chart/ | |
- name: Create Helm repo index | |
run: | | |
helm repo index . --url https://eth-cscs.github.io/firecrestspawner --merge index.yaml | |
rm -rf chart/Chart.lock chart/charts/ | |
mkdir gh_ | |
mv *.tgz index.yaml gh_ | |
- name: Push to gh-pages branch | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git fetch origin gh-pages:gh-pages | |
git checkout gh-pages | |
mv gh_/* . | |
git add *.tgz index.yaml | |
git commit -m "Update Helm repo" | |
git push origin gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |