-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (44 loc) · 1.38 KB
/
helm-release.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
name: Release helm package
on:
workflow_call:
inputs:
version:
description: "Helm package version"
default: true
type: string
secrets:
token:
required: true
env:
CI_COMMIT_AUTHOR: Dac-Cloud-Bot
CI_COMMIT_AUTHOR_EMAIL: [email protected]
CI_COMMIT_MESSAGE: "[CI] Add Helm Chart"
HELM_REPOSITORY: https://libertyglobal.github.io/appstore-caching-service/charts
jobs:
release-helm:
permissions:
contents: write
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name ${{ env.CI_COMMIT_AUTHOR }}
git config user.email ${{ env.CI_COMMIT_AUTHOR_EMAIL }}
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.5.0
- name: Generate and Publish Helm
run: |
git pull
helm package --version ${{ inputs.version }} --app-version ${{ inputs.version }} helm/appstore-caching-service -d charts/
helm repo index charts/ --url ${{ env.HELM_REPOSITORY }}
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "{{ env.CI_COMMIT_AUTHOR_EMAIL }}"
git add charts/
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push