-
Notifications
You must be signed in to change notification settings - Fork 23
63 lines (52 loc) · 1.7 KB
/
main.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
55
56
57
58
59
60
61
62
63
name: Release Charts
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CHART_NAME: ${{vars.CHART_NAME}}
CHART_VERSION: ${{ github.ref_name }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Google Auth
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v2"
with:
version: ">= 363.0.0"
- name: Login to artifact registry
run: |
cd kubernetes
gcloud auth activate-service-account ${{vars.SERVICE_ACCOUNT_NAME}} --key-file ${{secrets.GCP_SA_KEY_PRODUCTION}}
cat key.json | helm registry login -u _json_key --password-stdin https://${{vars.ARTIFACT_REGISTRY_HOST_NAME}}
- name: Prepare YQ
uses: dcarbone/install-yq-action@v1.1.1
with:
version: "v4.44.3"
download-compressed: "false"
force: "false"
- name: Update dependencies
run: |
cd kubernetes
make update_dependencies
- name: Helm package
run: |
cd kubernetes
make pack
- name: Helm push
run: |
cd kubernetes
helm push $CHART_NAME-${{ github.ref_name }}.tgz oci://${{vars.ARTIFACT_REGISTRY_HOST_NAME}}/${{vars.INFRA_PROJECT_ID}}/${{vars.ARTIFACT_REGISTRY_REPOSITORY}}