Skip to content

⚡ New tag 1.76

⚡ New tag 1.76 #217

Workflow file for this run

name: main
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "charts/**"
jobs:
env:
uses: devxp-tech/.github/.github/workflows/env.yaml@main
lint-chart:
name: Chart Lint 🔎
runs-on: ubuntu-latest
steps:
- name: Checkout Lint 🛎️
uses: actions/checkout@v1
- name: Run Chart Lint 🔎
uses: helm/chart-testing-action@main
with:
command: lint
config: .github/config/ct.yaml
kubeval-chart:
name: Chart Validator 🔎
runs-on: ubuntu-latest
needs:
- lint-chart
strategy:
matrix:
k8s:
- v1.16.8
- v1.17.4
- v1.20.15
- v1.21.13
- v1.22.10
steps:
- name: Checkout Kubeval 🛎️
uses: actions/checkout@v1
- name: Run kubeval 🔎
env:
KUBERNETES_VERSION: ${{ matrix.k8s }}
run: .github/kubeval.sh
quality-gate:
uses: devxp-tech/.github/.github/workflows/sonarqube.yaml@main
secrets: inherit
needs:
- env
# install-chart:
# name: install-chart
# runs-on: ubuntu-latest
# needs:
# - lint-chart
# - lint-docs
# - kubeval-chart
# strategy:
# matrix:
# k8s:
# - v1.12.10
# - v1.13.12
# - v1.14.10
# - v1.15.7
# - v1.16.4
# - v1.17.2
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Create kind ${{ matrix.k8s }} cluster
# uses: helm/kind-action@main
# with:
# node_image: kindest/node:${{ matrix.k8s }}
# - name: Run chart-testing (install)
# uses: helm/chart-testing-action@main
# with:
# command: install
# config: .github/ct.yaml
release:
name: Chart Release 📦
runs-on: ubuntu-latest
needs:
- quality-gate
- lint-chart
- kubeval-chart
steps:
- name: Checkout Release 🛎️
uses: actions/checkout@v1
- name: Git Setup 🔨
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Run chart-releaser 📈
uses: helm/chart-releaser-action@main
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
CR_SKIP_EXISTING: true
artifacts:
name: Generate Artifacts 📦
runs-on: ubuntu-latest
needs:
- release
steps:
- name: Checkout Artifacts 🛎️
uses: actions/checkout@v3
with:
ref: artifacts
- name: Git setup 🔨
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
- name: Download artifacts 📦
run: |
gh release list | awk '{print$1}' | while read line; do gh release download $line || true; done
if [[ $(git status -s) ]]; then
git add .
git commit -m ":robot: [github actions actor] update artifact list"
git push
else
echo "nothing to commit!!!"
fi
- name: Install Helm ☸️
uses: azure/setup-helm@v1
with:
version: v3.8.1
- name: Generate updated index.yaml 📦
run: |
helm repo index . --url "https://raw.githubusercontent.com/devxp-tech/helm-charts/artifacts/"
- name: Persist index.yaml 📦
uses: actions/upload-artifact@v3
with:
name: gh-pages
path: ./index.yaml
if-no-files-found: error
index:
name: Index Update 📝
runs-on: ubuntu-latest
needs:
- artifacts
steps:
- name: Chekcout gh-pages 🛎️
uses: actions/checkout@v3
with:
ref: gh-pages
- name: git setup 🔨
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
- uses: actions/download-artifact@v3
with:
name: gh-pages
- name: Commit New index.yaml 📝
run: |
if [[ $(git diff) ]];
then
git add index.yaml
git commit -m "[ci skip] :robot: [github actions actor] - update index.yaml"
git push
else
echo "nothing to do!!!"
fi
generate-docs:
name: Docs Generate 📝
runs-on: ubuntu-latest
needs:
- index
steps:
- name: Checkout Docs 🛎️
uses: actions/checkout@v3
- name: Generate Helm Docs 📦
uses: docker://jnorwood/helm-docs:v1.7.0
with:
entrypoint: /usr/bin/helm-docs
args: --chart-search-root /github/workspace
- name: Commit changes 📦
uses: stefanzweifel/git-auto-commit-action@v4.13.1
with:
commit_message: "[skip ci] :robot: Update Docs :zap:"
repository: .