-
Notifications
You must be signed in to change notification settings - Fork 86
70 lines (59 loc) · 2.09 KB
/
lint-test.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
name: Lint Test
on:
pull_request:
paths-ignore:
- '.github/**'
- 'README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
env:
branch_name: ${{ github.head_ref || github.ref_name }}
# renovate: datasource=github-releases depName=helm/helm
HELM_VERSION: v3.13.2
# renovate: datasource=github-tags depName=python/cpython
PYTHON_VERSION: v3.12.0
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Setup Helm 🧰
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with:
version: ${{ env.HELM_VERSION }}
- name: Setup Python 🐍
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup chart-testing 🧰
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
- name: Setup pybump
if: ${{ contains(env.branch_name, 'renovate') }}
run: |
pip3 install pybump
- name: Bump chart version
if: ${{ contains(env.branch_name, 'renovate') }}
id: bumped_charts
run: |
.github/renovate-bump.sh
- name: Run Chart lint tests 🧪
run: ct lint --target-branch main
# Use the REST API to commit changes, so we get automatic commit signing
- name: Push changes
if: ${{ contains(env.branch_name, 'renovate') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changed_charts: ${{ steps.bumped_charts.outputs.CHARTS }}
run: |
for chart in ${changed_charts}; do
export SHA=$(git rev-parse origin/${branch_name}:${chart} )
gh api --method PUT /repos/:owner/:repo/contents/${chart} \
--field message="chore: bumped ${chart} version" \
--field content=@<( base64 -i ${chart} ) \
--field branch="${branch_name}" \
--field sha="$SHA"
done