-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (72 loc) · 2.06 KB
/
labs-application.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
67
68
69
70
71
72
name: Deployment Workflow
on:
workflow_call:
inputs:
# Mandatory inputs
djangoProjectName:
required: true
type: string
dockerImageBaseName:
required: true
type: string
githubRef:
required: true
type: string
gitSha:
required: true
type: string
# Optional finetuning inputs
skipChecks: # NOTE: Use with CAUTION!
required: False
type: boolean
default: false
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCOUNT_ID:
required: true
GH_AWS_ACCESS_KEY_ID:
required: true
GH_AWS_SECRET_ACCESS_KEY:
required: true
jobs:
django:
name: Django
uses: pennlabs/shared-actions/.github/workflows/django.yaml@main
with:
projectName: ${{ inputs.djangoProjectName }}
imageName: "${{ inputs.dockerImageBaseName }}-backend"
skipDjangoCheck: ${{ inputs.skipChecks }}
githubRef: ${{ inputs.githubRef }}
gitSha: ${{ inputs.gitSha }}
path: backend
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
react:
name: React
uses: pennlabs/shared-actions/.github/workflows/react.yaml@main
with:
imageName: "${{ inputs.dockerImageBaseName }}-frontend"
skipReactCheck: ${{ inputs.skipChecks }}
githubRef: ${{ inputs.githubRef }}
gitSha: ${{ inputs.gitSha }}
path: frontend
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
deployment:
name: Deploy
uses: pennlabs/shared-actions/.github/workflows/deployment.yaml@main
if: ${{ inputs.githubRef }} == 'refs/heads/master'
with:
gitSha: ${{ inputs.gitSha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
GH_AWS_ACCESS_KEY_ID: ${{ secrets.GH_AWS_ACCESS_KEY_ID }}
GH_AWS_SECRET_ACCESS_KEY: ${{ secrets.GH_AWS_SECRET_ACCESS_KEY }}
needs:
- react
- django