-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (64 loc) · 2.11 KB
/
publish-artifacts.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
name: Publish Artifacts
on:
workflow_call:
inputs:
env:
required: true
type: string
description: Environment name
version:
required: true
type: string
description: Version number
app_index:
required: true
type: number
description: App settings index
settings:
required: true
type: string
description: JSON settings string
jobs:
setup:
name: Set up notifications
uses: Geta/gks/.github/workflows/configure-notifications.yaml@v5
secrets: inherit
with:
app_index: ${{ inputs.app_index }}
version: ${{ inputs.version }}
settings: ${{ inputs.settings }}
initial_state: |
:grey_question: *Docker image*
:grey_question: *Helm chart*
publish-docker:
name: Publish Docker image
needs: [ setup ]
uses: Geta/gks/.github/workflows/publish-docker.yaml@v5
secrets: inherit
with:
phase: 0
app_index: ${{ inputs.app_index }}
env: ${{ inputs.env }}
version: ${{ inputs.version }}
settings: ${{ inputs.settings }}
slack_artifact_name: ${{ needs.setup.outputs.artifact }}
slack_template_file: ${{ needs.setup.outputs.template_file }}
slack_phase_state: ${{ needs.setup.outputs.phase_state }}
args: ${{ fromJson(inputs.settings).general.apps[inputs.app_index].docker.arguments }}
publish-helm:
name: Publish Helm chart
needs: [ setup, publish-docker ]
uses: Geta/gks/.github/workflows/publish-helm.yaml@v5
secrets: inherit
with:
phase: 1
app_index: ${{ inputs.app_index }}
env: ${{ inputs.env }}
version: ${{ inputs.version }}
settings: ${{ inputs.settings }}
image_name: ${{ needs.publish-docker.outputs.image_name }}
image_tag: ${{ needs.publish-docker.outputs.image_tag }}
slack_artifact_name: ${{ needs.setup.outputs.artifact }}
slack_template_file: ${{ needs.setup.outputs.template_file }}
slack_phase_state: ${{ needs.publish-docker.outputs.slack_state }}
slack_message_id: ${{ needs.publish-docker.outputs.slack_message_id }}