forked from nouney/chart-tile38
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.7 KB
/
ci.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
name: CI
on:
push:
branches:
- '**'
tags-ignore:
- '*'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "setup helm"
uses: azure/setup-helm@v1
with:
version: 'v3.2.4'
- name: lint
run: helm lint -f values.yaml
- name: test deployment
run: helm template -f values.yaml . --debug
release_version:
if: github.ref_name == 'master' || github.ref_name == 'main'
permissions:
contents: 'write'
id-token: 'write'
runs-on: ubuntu-latest
needs:
- ci
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "setup helm"
uses: azure/setup-helm@v1
with:
version: 'v3.2.4'
- name: get Chart version
run: echo CHART_VERSION=$(yq '.version' Chart.yaml) >> $GITHUB_ENV
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/[email protected]'
with:
workload_identity_provider: ${{ secrets.GCP_WIP }}
service_account: 'gh-actions-production-sa@climacell-security-tools.iam.gserviceaccount.com'
token_format: 'access_token'
- name: setup gcs plugin
run: |
helm plugin install https://github.com/hayorov/helm-gcs.git;
helm repo add gcs-repo gs://tomorrow-helm-charts;
- name: push to gcs
run: |
helm package .
helm gcs push tile38-${{ env.CHART_VERSION }}.tgz gcs-repo
- name: push git tag
run: |
git tag ${{ env.CHART_VERSION }}
git push origin ${{ env.CHART_VERSION }}