generated from tsertkov/tpl-aws-astro
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.3 KB
/
deploy.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
name: ': deploy'
run-name: Deploy to ${{ inputs.env || 'stg' }}
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
env:
description: Environment
required: true
type: choice
default: stg
options:
- stg
- prd
push:
branches:
- main
paths:
- 'api/**'
- 'website/**'
concurrency:
group: ${{ inputs.env || 'stg' }}
cancel-in-progress: true
jobs:
gitversion:
name: Init deploy-${{ inputs.env || 'stg' }}
uses: ./.github/workflows/gitversion.yml
package-build:
name: Build ${{ needs.gitversion.outputs.version }}
uses: ./.github/workflows/package-build.yml
needs: gitversion
with:
env: ${{ inputs.env || 'stg' }}
version: ${{ needs.gitversion.outputs.version }}
package-deploy:
name: Deploy ${{ needs.gitversion.outputs.version }}
uses: ./.github/workflows/package-deploy.yml
needs:
- package-build
- gitversion
with:
env: ${{ inputs.env || 'stg' }}
deployment-test:
name: Test ${{ needs.gitversion.outputs.version }}
uses: ./.github/workflows/deployment-test.yml
needs:
- package-deploy
- gitversion
with:
env: ${{ inputs.env || 'stg' }}
version: ${{ needs.gitversion.outputs.version }}