forked from meshery/meshery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request meshery#2675 from layer5io/feat/helm-ci
Add the CI for auto release the Helm chart
- Loading branch information
Showing
2 changed files
with
106 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Release Charts | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'install/kubernetes/**' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'install/kubernetes/**' | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.1 | ||
- name: Helm lint | ||
env: | ||
CHARTS_PATH: install/meshery | ||
run: | ||
helm lint ${{ env.CHARTS_PATH }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [lint-test] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Configure Git | ||
env: | ||
GITHUB_ACTOR: Aisuko | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.1 | ||
- name: Add dependency chart repos | ||
run: | | ||
helm repo add meshery https://meshery.io/charts/ | ||
- name: Helm Chart Releaser For Remote | ||
uses: Aisuko/chart-releaser-action@v1.0.0-alpha.14 | ||
with: | ||
charts_dir: install/kubernetes/helm | ||
owner: layer5io | ||
repo: layer5io/meshery.io | ||
# For helm charts index | ||
charts_repo_url: https://meshery.io/charts/ | ||
pages_branch: master | ||
activity: none | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Checkout target repo | ||
uses: actions/checkout@v2 | ||
env: | ||
REPO: layer5io/meshery.io | ||
REPO_PATH: meshery.io | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: "${{ env.REPO }}" | ||
path: ${{ env.REPO_PATH }} | ||
- name: Copy index to new repo | ||
env: | ||
SOURCE: /home/runner/work/meshery/meshery/.cr-index/index.yaml | ||
TARGET: meshery.io/charts | ||
run: | ||
cp ${{ env.SOURCE }} ${{ env.TARGET }} | ||
- name: Push | ||
env: | ||
REPO_PATH: meshery.io | ||
GIT_USERNAME: Aisuko | ||
GIT_EMAIL: Aisuko@users.noreply.github.com | ||
run: | | ||
cd ${{ env.REPO_PATH }} | ||
git config --local user.name "${{ env.GIT_USERNAME }}" | ||
git config --local user.email "${{ env.GIT_EMAIL }}" | ||
git add . | ||
git commit -s -m "Github Actions Automatically Built in `date +"%Y-%m-%d %H:%M"`" | ||
git push |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# See https://github.com/helm/chart-testing#configuration | ||
remote: origin | ||
chart-dirs: | ||
- install/kubernetes/helm/meshery | ||
chart-repos: | ||
- meshery=https://meshery.io/charts/ | ||
helm-extra-args: --timeout 600s |