CHANGE grok exporter image #110
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 Charts | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # click the button on Github repo! | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Update dependecy | |
run: | | |
helm repo add prometheus https://prometheus-community.github.io/helm-charts | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Copy README.md files to gh-pages | |
run: | | |
existing_worktree=$(git worktree list --porcelain | grep -B 2 "branch refs/heads/gh-pages" | head -n 1 | cut -d ' ' -f 2) | |
if [[ $existing_worktree != "" ]]; then git worktree remove -f $existing_worktree; fi | |
tmp_folder=$(mktemp -d) | |
git worktree add ${tmp_folder} gh-pages | |
rm -f -r ${tmp_folder}/charts | |
cp -r charts ${tmp_folder}/ | |
pushd ${tmp_folder} | |
git add -A "charts/**/README.md" | |
git add -A "charts/**/values.yaml" | |
git pull origin gh-pages && git commit -m "Updating README.md and values files" && git push origin gh-pages | |
popd |