-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (48 loc) · 1.93 KB
/
Copy pathdeploy-dev.yml
File metadata and controls
54 lines (48 loc) · 1.93 KB
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
name: Promise Tracker | Deploy | Dev
on:
push:
branches: [main]
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
cancel-in-progress: true
# Least-privilege default for GITHUB_TOKEN. Deployment authenticates to
# DockerHub/Dokku via dedicated secrets, not the workflow token.
permissions:
contents: read
jobs:
# Mandatory verification gate. Deployment cannot run when this fails.
verify:
uses: ./.github/workflows/verify.yml
# Build the immutable runtime + migrator images once (no reachable DB needed).
build:
needs: verify
uses: ./.github/workflows/build-image.yml
with:
image_name: "codeforafrica/promisetracker-v2"
next_public_app_url: "https://promisetracker-v2.dev.codeforafrica.org"
sentry_environment: "development"
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# Migrate once, then promote the exact digest, then verify readiness.
deploy:
needs: build
uses: ./.github/workflows/promote.yml
with:
environment: development
app_name: promisetracker-v2
dokku_remote_url: "ssh://azureuser@ui-1.dev.codeforafrica.org"
app_url: "https://promisetracker-v2.dev.codeforafrica.org"
image_name: "codeforafrica/promisetracker-v2"
runtime_digest: ${{ needs.build.outputs.runtime_digest }}
migrator_digest: ${{ needs.build.outputs.migrator_digest }}
secrets:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
DATABASE_URI: ${{ secrets.DATABASE_URI }}
PAYLOAD_SECRET: ${{ secrets.PAYLOAD_SECRET }}