-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (67 loc) · 2.16 KB
/
cd.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
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Publish & Deploy
run-name: "${{ inputs.AWS_ENV || 'DEV' }}: ${{ github.event.pull_request.title || github.ref }} ${{ inputs.UUID }}"
on:
pull_request:
types: [ closed ]
branches: [ dev ]
workflow_dispatch:
inputs:
AWS_ENV:
required: true
default: DEV
type: choice
description: Environment to Deploy
options: [ DEV, STAGE, PROD ]
UUID:
required: false
type: string
description: UUID of workflow
env:
SVC_NAME: "cesr_verifier"
jobs:
setup:
if: |
(contains(github.event.pull_request.title, '[no-deploy]') == false && github.event.pull_request.merged == true) ||
inputs.UUID ||
github.event_name == 'workflow_dispatch'
runs-on: ${{ vars.RUNNER_TYPE }}
steps:
- run: echo "Dummy"
outputs:
AWS_ENV: ${{ inputs.AWS_ENV || 'DEV' }}
SVC_NAME: ${{ env.SVC_NAME }}
build:
needs: setup
uses: ./.github/workflows/build.yml
secrets: inherit
tag-push:
name: ${{ needs.setup.outputs.AWS_ENV }}
needs: [ setup, build ]
uses: provenant-dev/github-action-helper/.github/workflows/tag-push.yml@main
secrets: inherit
with:
AWS_ENV: ${{ needs.setup.outputs.AWS_ENV }}
set-version:
name: ${{ needs.setup.outputs.AWS_ENV }}
needs: [ setup, tag-push ]
uses: provenant-dev/github-action-helper/.github/workflows/set-version.yml@main
secrets: inherit
with:
DEPLOY_ENV: ${{ needs.setup.outputs.AWS_ENV }}
RELEASE_VERSION: ${{ needs.tag-push.outputs.RELEASE_VERSION }}
SVC_NAME: ${{ needs.setup.outputs.SVC_NAME }}
publish:
name: ${{ needs.setup.outputs.AWS_ENV }}
needs: [ setup, tag-push ]
uses: provenant-dev/github-action-helper/.github/workflows/publish.yml@main
secrets: inherit
with:
AWS_ENV: ${{ needs.setup.outputs.AWS_ENV }}
RELEASE_VERSION: ${{ needs.tag-push.outputs.RELEASE_VERSION }}
deploy:
name: ${{ needs.setup.outputs.AWS_ENV }}
needs: [ setup, publish, set-version ]
uses: provenant-dev/github-action-helper/.github/workflows/deploy-helm.yml@main
secrets: inherit
with:
AWS_ENV: ${{ needs.setup.outputs.AWS_ENV }}