Merge pull request #33 from marklogic/release/ea2 #5
This file contains hidden or 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 Charts | |
concurrency: release-helm | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: 'src' | |
ref: 'main' | |
fetch-depth: 0 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: 'dest' | |
ref: 'gh-pages' | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
cd dest | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
- 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/marklogic/marklogic-kubernetes-operator/gh-pages/ | |
git add $(git ls-files -o --exclude-standard) | |
git add index.yaml | |
git commit -m "Updated from ref: $GITHUB_SHA" | |
git push |