Skip to content

Merge pull request #81 from opensrp/update-web-helm #70

Merge pull request #81 from opensrp/update-web-helm

Merge pull request #81 from opensrp/update-web-helm #70

Workflow file for this run

# Kindly refer to https://github.com/helm/chart-releaser-action
name: Publish Charts
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.5.0
- name: Run chart-releaser
uses: helm/[email protected] # step that writes the latest chart versions (below) depends on this step writing the latest version as the first index in the entries.<name of chart> list in the index.yaml file
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Install Python
uses: actions/setup-python@v1
- name: Install pip requirements
uses: BSFishy/pip-action@v1
with:
packages: |
shyaml==0.6.2
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: gh-pages
- name: Record the latest chart versions
run: |
releaseDir="latest"
if [[ ! -d ${releaseDir} ]]; then
mkdir -p ${releaseDir}
fi
charts=($(cat index.yaml | shyaml keys entries))
for curChart in "${charts[@]}"; do
curChartVersion=$(cat index.yaml | shyaml get-value entries.${curChart}.0.version)
echo ${curChartVersion} > ${releaseDir}/${curChart}
done
- uses: EndBug/add-and-commit@v7
with:
message: 'Set the latest the chart versions'
branch: gh-pages