wip: π temporary commit #10
Workflow file for this run
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: π§ͺ Chart | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [feat/helm] # TODO: change to [master, main] | |
paths-ignore: ['**.md'] | |
pull_request: | |
paths-ignore: ['**.md'] | |
concurrency: | |
group: ${{ github.ref }}-charts | |
cancel-in-progress: true | |
jobs: | |
helm-pack: | |
name: Pack the Helm chart | |
runs-on: ubuntu-latest | |
defaults: {run: {working-directory: ./chart}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azure/setup-helm@v4 | |
- run: helm package --app-version 2.0.0 . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: helm-chart | |
path: ./chart/*-[0-9].[0-9].[0.9].tgz | |
if-no-files-found: error | |
retention-days: 1 | |
helm-publish: | |
name: Put the Helm chart to the GitHub pages branch | |
runs-on: ubuntu-latest | |
needs: [helm-pack] | |
steps: | |
- uses: actions/checkout@v4 | |
with: {ref: gh-pages} | |
- uses: azure/setup-helm@v4 | |
- name: Configure git | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
- uses: actions/download-artifact@v4 | |
with: {name: helm-chart, path: ./helm-charts} | |
- name: Update the index.yaml | |
run: | | |
helm repo index \ | |
--url https://${{ github.actor }}.github.io/${{ github.event.repository.name }}/helm-charts/ \ | |
--merge \ | |
./helm-charts/index.yaml \ | |
./helm-charts | |
- name: Update the index.html | |
run: tree -H '.' --noreport --dirsfirst -T 'Index' --charset utf-8 -P "*.tgz" -o ./index.html | |
- name: Commit and push the changes | |
run: | | |
git add 'helm-charts/*' index.html | |
git commit -m "Add the helm chart" | |
git push origin gh-pages |