forked from Mailu/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: fastlorenzo <[email protected]>
- Loading branch information
1 parent
de07098
commit aa83502
Showing
2 changed files
with
58 additions
and
65 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,61 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
--- | ||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
#pull_request: | ||
# branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout chart | ||
uses: actions/checkout@v2 | ||
- name: Install helm 2+3 | ||
run: | | ||
curl -s -L https://get.helm.sh/helm-v3.10.0-linux-amd64.tar.gz | tar xfvz - --strip-components=1 linux-amd64/helm | ||
chmod 0700 helm | ||
mv helm helm3 | ||
- name: Install dependencies | ||
run: | | ||
./helm3 repo add bitnami https://charts.bitnami.com/bitnami | ||
./helm3 dependency build mailu | ||
- name: Running lint with helm v3 | ||
run: ./helm3 lint --strict --values mailu/helm-lint-values.yaml mailu | ||
- name: Checkout gh pages | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'gh-pages' | ||
path: gh-pages | ||
- name: Pack chart | ||
run: | | ||
./helm3 package mailu -d gh-pages | ||
./helm3 repo index --url https://mailu.github.io/helm-charts/ gh-pages | ||
( cd gh-pages && ./index.html.sh > index.html ) | ||
- name: Render chart to yamls | ||
run: | | ||
VERSION=$( grep mailu/Chart.yaml -e '^version:' | awk '{ print $2 }' ) | ||
mkdir -p gh-pages/yaml | ||
rm -rf gh-pages/yaml/${VERSION} | ||
./helm3 template mailu --values mailu/helm-lint-values.yaml --release-name mailu --namespace mailu --output-dir gh-pages/yaml/${VERSION} | ||
- name: Show gh-pages changes | ||
run: | | ||
cd gh-pages | ||
git status | ||
- name: Pushing changes to gh-pages | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.10.0 | ||
|
||
- name: Install dependencies | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Github actions" | ||
cd gh-pages | ||
git add . | ||
git commit -m "Automated build" | ||
git push | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo update | ||
- name: Run helm lint | ||
run: helm lint --strict --values mailu/helm-lint-values.yaml mailu | ||
|
||
# - name: Checkout gh pages | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# ref: 'gh-pages' | ||
# path: gh-pages | ||
# - name: Pack chart | ||
# run: | | ||
# ./helm3 package mailu -d gh-pages | ||
# ./helm3 repo index --url https://mailu.github.io/helm-charts/ gh-pages | ||
# ( cd gh-pages && ./index.html.sh > index.html ) | ||
# - name: Render chart to yamls | ||
# run: | | ||
# VERSION=$( grep mailu/Chart.yaml -e '^version:' | awk '{ print $2 }' ) | ||
# mkdir -p gh-pages/yaml | ||
# rm -rf gh-pages/yaml/${VERSION} | ||
# ./helm3 template mailu --values mailu/helm-lint-values.yaml --release-name mailu --namespace mailu --output-dir gh-pages/yaml/${VERSION} | ||
# - name: Show gh-pages changes | ||
# run: | | ||
# cd gh-pages | ||
# git status | ||
# - name: Pushing changes to gh-pages | ||
# run: | | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "Github actions" | ||
# cd gh-pages | ||
# git add . | ||
# git commit -m "Automated build" | ||
# git push |