-
Notifications
You must be signed in to change notification settings - Fork 20
54 lines (48 loc) · 1.46 KB
/
release-branch.yml
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
name: CI triggered by release branch
on:
push:
branches:
- 'release/**'
jobs:
release-helm-charts:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# TODO: find a way to let the release workflow depends on the lint & test ones
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache-dependency-path: "**/*.sum"
- name: Check helm docs
run: |
make gen-helm-docs
if ! git diff --exit-code; then
echo "Generated files are not up-to-date. Please run 'make gen-helm-docs' and commit changes."
exit 1
fi
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Add repositories
run: |
for dir in $(ls -d ./manifests/charts/*/); do
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
done
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: ./manifests/charts
mark_as_latest: false
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"