Skip to content

Merge pull request #81 from patrickeasters/exclude_dependent_charts #117

Merge pull request #81 from patrickeasters/exclude_dependent_charts

Merge pull request #81 from patrickeasters/exclude_dependent_charts #117

Workflow file for this run

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 "$GITHUB_ACTOR@users.noreply.github.com"
- name: Update dependecy
run: |
helm repo add prometheus https://prometheus-community.github.io/helm-charts
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
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