mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 02:45:06 +00:00
helm release workflow added
This commit is contained in:
parent
2768574a39
commit
37964ebc55
1 changed files with 43 additions and 0 deletions
43
.github/workflows/helm-release.yaml
vendored
Normal file
43
.github/workflows/helm-release.yaml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: helm-package
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'charts/kyverno/**'
|
||||
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 nirmata ${{ env.HELM_CHART_URL }}
|
||||
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/kyverno/
|
||||
- name: Create package
|
||||
run: |
|
||||
mkdir -p gh-pages/helm-charts/
|
||||
helm package charts/kyverno/ -d gh-pages/helm-charts/
|
||||
- name: Reindex repo
|
||||
run: |
|
||||
wget --quiet ${{ env.HELM_CHART_URL }}/index.yaml
|
||||
helm repo index --merge index.yaml --url ${{ env.HELM_CHART_URL }} gh-pages/helm-charts/
|
Loading…
Add table
Reference in a new issue