-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 1.06 KB
/
main.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
# main.yml
name: Orchestrator Workflow
on:
pull_request:
branches:
- "**"
push:
branches:
- main
jobs:
ci:
uses: ./.github/workflows/django_ci.yml # Call the CI workflow
with:
branch: ${{ github.ref_name }}
secrets: inherit
migrate:
if: github.event_name == 'push' && github.ref_name == 'main'
needs: ci
uses: ./.github/workflows/django_gcp_migrate.yml
secrets:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
GCP_CLOUD_CONNECTION_NAME: ${{ secrets.GCP_CLOUD_CONNECTION_NAME }}
GCP_IAM_SA_CREDENTIALS: ${{ secrets.GCP_IAM_SA_CREDENTIALS }}
deploy:
if: github.event_name == 'push' && github.ref_name == 'main'
needs: migrate
uses: ./.github/workflows/django_gcp_deploy.yml # Call the Deploy workflow
with:
github_sha: ${{ github.sha }}
secrets:
GCP_AR_REPO_NAME: ${{ secrets.GCP_AR_REPO_NAME }}
GCP_IAM_SA_CREDENTIALS: ${{ secrets.GCP_IAM_SA_CREDENTIALS }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_SERVICE_NAME: ${{ secrets.GCP_SERVICE_NAME }}