1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/.github/workflows/helm-release.yaml

51 lines
1.6 KiB
YAML
Raw Normal View History

2020-05-27 06:06:46 +00:00
name: helm-package
on:
push:
branches:
- master
paths:
- 'charts/kyverno/**'
2020-05-28 20:00:01 +00:00
pull_request:
2020-05-27 06:06:46 +00:00
env:
HELM_CHART_URL: "https://nirmata.github.io/kyverno/helm-charts/"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install Helm
run: |
curl -sSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get
chmod 700 get_helm.sh
./get_helm.sh
helm init --client-only
- name: Check Chart Version
run: |
helm repo add evalsocket ${{ env.HELM_CHART_URL }}
2020-05-27 06:06:46 +00:00
helm search nirmata/kyverno --version `cat charts/kyverno/Chart.yaml | grep '^version: [[:alnum:]]' | awk '{print $2}'` > HELM_CHART_STATUS.txt
HELM_CHART_STATUS=`cat HELM_CHART_STATUS.txt`
if [ "${HELM_CHART_STATUS}" != 'No results found' ]; then
echo 'Version already exist, impossible to continue...'
exit 1
fi
- name: Check sintax
run: helm lint charts/oldmonk/
2020-05-27 06:06:46 +00:00
- name: Create package
run: |
mkdir -p output/helm-charts/
helm package charts/oldmonk/ -d output/helm-charts/
2020-05-27 06:06:46 +00:00
- name: Reindex repo
run: |
wget --quiet ${{ env.HELM_CHART_URL }}/index.yaml
helm repo index --merge index.yaml --url ${{ env.HELM_CHART_URL }} output/helm-charts/
- name: Release
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
2020-05-28 20:00:01 +00:00
FOLDER: output