-
Notifications
You must be signed in to change notification settings - Fork 123
68 lines (59 loc) · 1.73 KB
/
pr-main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: PR Checks
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- name: Cache bin path
id: cache
uses: actions/cache@v3
with:
path: bin
key: ${{ runner.os }}-${{ env.HELM_VERSION }}-${{ env.YQ_VERSION }}
- name: Checkout
uses: actions/checkout@v3
- name: Update PATH
run: |
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Create env variables
run: ./.github/scripts/env_variables.sh
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: ${{ env.HELM_VERSION }}
- name: Add K8ssandra Helm repo
run: |
helm repo add k8ssandra https://helm.k8ssandra.io/stable
helm repo update
- name: Install yq and validate tool versions
run: |
scripts/install-yq.sh ${{ env.YQ_VERSION }}
helm version
yq -V
- name: Update chart dependencies
run: |
scripts/update-helm-deps.sh
- name: Setup working directory
run: |
mkdir build
cp -rv charts/* build/
find build/cass-operator/templates -name '*.yaml' | xargs sed -i -e 's/.Capabilities.APIVersions.Has "cert-manager.io\/v1"/true/g'
- name: Lint charts
run: |
ls | while read c; do
if [[ -d $c ]]; then
helm lint $c
if [[ $? -ne 0 ]]; then
EXIT_CODE=$?
echo "::error file=charts/$c::Error linting $c, check job output"
exit $EXIT_CODE
fi
fi
done
working-directory: build