-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (87 loc) · 2.51 KB
/
ci.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: ci
on:
# Run on all PRs
pull_request:
env:
HELM_VERSION: v3.14.4
PYTHON_VERSION: 3.x
jobs:
diff:
runs-on: ubuntu-latest
outputs:
charts: ${{ steps.changes.outputs.changes }}
steps:
-
name: Find changed charts
id: changes
uses: dorny/paths-filter@v3
with:
filters: |
charts/aserto:
- 'charts/aserto/**'
charts/aserto_lib:
- 'charts/aserto-lib/**'
charts/authorizer:
- 'charts/authorizer/**'
charts/console:
- 'charts/console/**'
charts/directory:
- 'charts/directory/**'
charts/discovery:
- 'charts/discovery/**'
charts/scim:
- 'charts/scim/**'
lint:
runs-on: ubuntu-latest
needs: diff
if: needs.diff.outputs.charts
steps:
- name: debug
run: |
echo raw: ${{ needs.diff.outputs.charts }}
echo json: ${{ toJSON(needs.diff.outputs.charts) }}
echo join: ${{ join(needs.diff.outputs.charts) }}
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "USERNAME" | DOCKER_USERNAME;
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
uses: actions/checkout@v4
with:
# Fetch the full history so that we can diff against the target branch
fetch-depth: 0
-
name: Set up Helm
uses: azure/setup-helm@v4
with:
version: ${{ env.HELM_VERSION }}
-
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: true
-
name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
with:
version: v3.10.0
-
name: Lint ${{ matrix.chart.name }}
run: |
ct lint --config ct.yaml \
--charts '${{ join(needs.diff.outputs.charts) }}' \
--target-branch ${{ github.event.repository.default_branch }} \
--helm-repo-extra-args "aserto-helm=-u gh -p ${READ_WRITE_TOKEN}"
# test-changes:
# runs-on: ubuntu-latest
# container: python:3
# needs: detect-changes
# strategy:
# matrix:
# chart: ${{ fromJSON(needs.detect-changes.outputs.charts) }}