refactor: add helm script and job
This commit is contained in:
parent
f36c1f5b91
commit
3028e8ebf8
28
.github/workflows/build.yaml
vendored
28
.github/workflows/build.yaml
vendored
@ -108,6 +108,34 @@ jobs:
|
||||
if: failure()
|
||||
uses: andymckay/cancel-action@0.2
|
||||
|
||||
lint-helm:
|
||||
name: Lint Helm chart
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v23.2
|
||||
with:
|
||||
files: |
|
||||
ci/helm-chart/**
|
||||
|
||||
- name: Install helm
|
||||
uses: azure/setup-helm@v3.3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Lint Helm chart
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
run: ./ci/dev/helm.sh
|
||||
|
||||
- name: Fail workflow
|
||||
if: failure()
|
||||
uses: andymckay/cancel-action@0.2
|
||||
|
||||
build:
|
||||
name: Build
|
||||
needs: prebuild
|
||||
|
14
ci/dev/helm.sh
Executable file
14
ci/dev/helm.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
main() {
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
if command -v helm && helm kubeval --help > /dev/null; then
|
||||
helm kubeval ci/helm-chart
|
||||
fi
|
||||
|
||||
cd "$OLDPWD"
|
||||
}
|
||||
|
||||
main "$@"
|
@ -6,9 +6,6 @@ main() {
|
||||
|
||||
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js" | grep -v "lib/vscode")
|
||||
tsc --noEmit --skipLibCheck
|
||||
if command -v helm && helm kubeval --help > /dev/null; then
|
||||
helm kubeval ci/helm-chart
|
||||
fi
|
||||
|
||||
cd "$OLDPWD"
|
||||
}
|
||||
|
@ -27,6 +27,7 @@
|
||||
"_audit": "./ci/dev/audit.sh",
|
||||
"fmt": "./ci/dev/fmt.sh",
|
||||
"lint": "./ci/dev/lint.sh",
|
||||
"lint:helm": "./ci/dedv/helm.sh",
|
||||
"lint:sh": "shellcheck -e SC2046,SC2164,SC2154,SC1091,SC1090,SC2002 $(git ls-files '*.sh' | grep -v 'lib/vscode')",
|
||||
"test": "echo 'Run yarn test:unit or yarn test:e2e' && exit 1",
|
||||
"ci": "./ci/dev/ci.sh",
|
||||
|
Reference in New Issue
Block a user