Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
Signed-off-by: fastlorenzo <[email protected]>
  • Loading branch information
fastlorenzo committed Oct 10, 2022
1 parent de07098 commit aa83502
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 65 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions

name: Helm lint

# Controls when the workflow will run
Expand All @@ -11,25 +9,24 @@ on:
# 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"
lint:
# 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
- name: Checkout
uses: actions/checkout@v2
- name: Install helm 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
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0

- 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
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
92 changes: 44 additions & 48 deletions .github/workflows/main.yml
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

0 comments on commit aa83502

Please sign in to comment.