-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 2.22 KB
/
_deploy_chart.yaml
File metadata and controls
49 lines (48 loc) · 2.22 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
name: deploy helm chart
on:
workflow_call:
workflow_dispatch:
jobs:
deploy:
name: deploy helm chart
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fetch latest tag
id: get-latest-tag
run: |
git fetch --tags
echo "latest-tag=$(git tag --list --sort='-*authordate' | tail -n 1)" >> "$GITHUB_OUTPUT"
- name: Get Helm Chart version
id: get-chart-version
run: |
echo "chart-version=$(yq '.version' chart/cert-manager-webhook-ionos-cloud/Chart.yaml)" >> "$GITHUB_OUTPUT"
- name: Install helm chart
uses: azure/setup-helm@v5.0.0
- name: Package helm chart
run: |
helm package chart/cert-manager-webhook-ionos-cloud/ --app-version ${{ steps.get-latest-tag.outputs.latest-tag }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.get-chart-version.outputs.chart-version }}-chart+${{ steps.get-latest-tag.outputs.latest-tag }}
name: Chart version ${{ steps.get-chart-version.outputs.chart-version }} with app version ${{ steps.get-latest-tag.outputs.latest-tag }}
token: ${{ github.token }}
prerelease: false
makeLatest: false
allowUpdates: true
artifacts: >
*.tgz
- name: switch to helm repo branch and create/update index.yaml
run: |
git checkout helm-repo
helm repo index . --merge index.yaml \
--url https://github.com/ionos-cloud/cert-manager-webhook-ionos-cloud/releases/download/${{ steps.get-chart-version.outputs.chart-version }}-chart+${{ steps.get-latest-tag.outputs.latest-tag }}/
git config user.email "no-reply@ionos-cloud.com";
git config user.name "IONOS-CloudBot";
git add index.yaml
git commit -m "chore(chart): update helm repository index"
git push origin helm-repo