Release Helm Charts #10
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 Charts | |
concurrency: release-helm | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'temp/**' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
path: 'src' | |
ref: 'master' | |
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@v1 | |
- name: Update New Files and push to master branch | |
shell: bash | |
working-directory: src | |
run: | | |
helm repo index ./charts --merge ../dest/index.yaml --url https://raw.githubusercontent.com/kdavid76/sm-customer/gh-pages/charts/ | |
mkdir -p ../dest/charts | |
echo "Copying files..." | |
shopt -s extglob | |
mkdir -p ./charts/ | |
echo "n" | cp -pr ./charts/!(index.yaml) ../dest/charts/ | |
echo "n" | cp -pr ./charts/index.yaml ../dest/ | |
git config user.name "helm" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "Updated from ref: $GITHUB_SHA" | |
git push | |
- name: Push New Files | |
shell: bash | |
working-directory: dest | |
run: | | |
git config user.name "helm" | |
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 |