Skip to content

Commit

Permalink
Github Actions for helm gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
php1301 committed Apr 11, 2024
1 parent 4752997 commit 229aca8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# What I did in this PR
- <which changes or you can use commit message> - *PlaceHolder* - *phucpham1301*

# Checklist
- [ ] Add provisioning ABC
- [ ] Tests are enough
- [ ] Check the code on the local environment
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release Helm Charts

# Do not change this
concurrency: release-helm

on:
workflow_dispatch:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: 'src'
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v3

- name: Package Helm Charts
shell: bash
run: |
find src/charts/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up
for d in src/charts/*/ ; do
echo "$d"
helm package "$d" -u -d dest
done
- name: Push New Files
shell: bash
working-directory: dest
run: |
helm repo index . --url https://raw.githubusercontent.com/UQThesisENGG7817/helm-charts/gh-pages/
git config user.name "Potter UQ Thesis Bot"
git config user.email "[email protected]"
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Updated from ref: $GITHUB_SHA"
git push

0 comments on commit 229aca8

Please sign in to comment.