-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (73 loc) · 2.05 KB
/
Copy pathpublish-chart.yml
File metadata and controls
76 lines (73 loc) · 2.05 KB
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
---
# This workflow is triggered whenever we release a new version of Starboard
# by creating an annotated Git tag and pushing it to the upstream Git repository.
#
name: Publish Chart
on:
push:
branches:
- main
paths:
- 'helm/**'
- 'CHART_VERSION'
tags-ignore:
- "*"
workflow_dispatch:
env:
CHART_DIR: helm/chart
permissions:
contents: write
jobs:
test-helm-chart:
name: Test Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v5
with:
version: v3.19.0
- name: Set up python
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@v2.8.0
- name: Run chart-testing
run: ct lint --validate-maintainers=false --charts ${{ env.CHART_DIR }}
publish:
name: Release Helm Chart
needs:
- test-helm-chart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- id: package
name: Package charts
run: |
helm package ${{ env.CHART_DIR }}
git add *.tgz
if git diff --quiet --cached; then
echo "There is no new package"
exit 1
fi
- name: Checkout gh-pages
run: |
git fetch origin gh-pages
git switch -c gh-pages FETCH_HEAD
- name: Update index
run: |
URL="https://${{ github.repository_owner }}.github.io/k8s-ardoq-bridge"
helm repo index --url "$URL" . --merge index.yaml
- name: Commit
run: |
ADDED_FILE="$(git status --porcelain | grep '^A' | cut -c4- | sed 's/\.tgz$//')"
git add index.yaml
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit -m "Updated chart index: ${ADDED_FILE}"
- run: git push origin gh-pages