-
Notifications
You must be signed in to change notification settings - Fork 50
46 lines (42 loc) · 1.39 KB
/
restore-backup-dev-pr.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
name: DB Restore for dev and feature branches
on:
workflow_dispatch:
inputs:
restoreSourceFile:
type: string
description: |
The sourceFile of the backup in the bucket to restore, e.g.
ecamp3-dev/2023-07-17-12-55-33-ecamp3-dev.sql.gz.gpg
required: true
default: latest
pr_number:
type: number
description: |
The pr number if it is a pr (3898), else null
required: false
env:
type: environment
description: The environment, if name is dev then dev, else feature-branch
required: true
default: dev
jobs:
build-and-push:
name: Build and push docker images
uses: ./.github/workflows/reusable-build-and-push.yml
with:
sha: ${{ github.sha }}
secrets:
DOCKER_HUB_USERNAME: ${{ vars.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
upgrade-or-install-deployment:
name: Upgrade or install deployment
needs: build-and-push
uses: ./.github/workflows/reusable-dev-deployment.yml
with:
name: ${{ inputs.pr_number == null && 'dev' || format('pr{0}', inputs.pr_number) }}
sha: ${{ github.sha }}
env: ${{ inputs.env }}
pr_number: ${{ inputs.pr_number }}
dropDBOnUninstall: ${{ inputs.pr_number != null }}
restoreSourceFile: ${{ inputs.restoreSourceFile }}
secrets: inherit