forked from kubernetes-sigs/node-ipam-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (84 loc) · 2.61 KB
/
helm.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
92
93
94
95
96
97
98
99
100
101
102
name: Helm
on:
push:
branches:
- main
pull_request:
paths:
- 'charts/**'
workflow_dispatch: {}
release:
types: [published]
permissions:
contents: write
pages: write
id-token: write
jobs:
helm-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Version
run: |
TAG=$(git describe --tags --abbrev=0)
sed -ie "s/appVersion: \"latest\"/appVersion: ${TAG}/g" ./charts/node-ipam-controller/Chart.yaml
sed -ie "s/version: 0.0.0/version: ${TAG}/g" ./charts/node-ipam-controller/Chart.yaml
- name: Set up Helm
uses: azure/setup-helm@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (lint)
run: ct lint --check-version-increment=false --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }}
helm-release:
needs: helm-test
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Set Version
run: |
TAG=$(git describe --tags --abbrev=0)
sed -ie "s/appVersion: \"latest\"/appVersion: ${TAG}/g" ./charts/node-ipam-controller/Chart.yaml
sed -ie "s/version: 0.0.0/version: ${TAG}/g" ./charts/node-ipam-controller/Chart.yaml
- name: Package Helm Chart
run: |
mkdir -p .cr-release-packages
helm package charts/node-ipam-controller --destination .cr-release-packages
- name: Create Index
run: |
helm repo index --url https://komer3.github.io/node-ipam-controller .cr-release-packages
- name: Setup Pages
uses: actions/configure-pages@v4
- name: List files
run: |
ls -la
ls -la .cr-release-packages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.cr-release-packages'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4