-
Notifications
You must be signed in to change notification settings - Fork 34
50 lines (48 loc) · 1.61 KB
/
publish.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
# Publish a new version of a chart after each CI build
name: Publish
on:
# repository_dispatch:
# types: [sync-success]
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
update_helm_chart:
name: "Update Helm Chart"
environment: prod
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Download Image Tags
uses: dawidd6/action-download-artifact@v2
with:
name: image_tags
workflow: ci.yml
# run_id: ${{ github.event.client_payload.runid }}
run_id: ${{ github.event.workflow_run.id }}
path: ${{ github.workspace }}
- name: Download Manifests
uses: dawidd6/action-download-artifact@v2
with:
name: manifests
workflow: ci.yml
# run_id: ${{ github.event.client_payload.runid }}
run_id: ${{ github.event.workflow_run.id }}
path: ${{ github.workspace }}
- name: Read Image Tags
run: |
echo "IMAGE_TAG=$(cat ${{ github.workspace }}/IMAGE_TAG)" >> $GITHUB_ENV
- name: Generate Manifests
run: |
.github/workflows/utils/generate-manifests.sh ${{ github.workspace }}/manifests gen_manifests hld_only
env:
APP_BUILD_VERSION: ${{ env.IMAGE_TAG }}
ORCHESTRATOR_PAT: ${{ secrets.ORCHESTRATOR_PAT }}
- name: Publish Helm Chart
run: |
.github/workflows/utils/publish_helm_chart.sh gen_manifests/hld/helm ${{ secrets.HELM_CHARTS_REPO_NAME }} ${{ secrets.HELM_CHARTS_URL }}
env:
TOKEN: ${{ secrets.HELM_CHARTS_PAT }}