forked from ecamp/ecamp3
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1.05 KB
/
deployment-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
name: CD for feature branches
on:
pull_request_target:
types: [opened, reopened, labeled, synchronize]
concurrency:
group: ${{ github.workflow}}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build-and-push:
if: contains(github.event.pull_request.labels.*.name, 'deploy!')
name: Build and push docker images
uses: ./.github/workflows/reusable-build-and-push.yml
with:
sha: ${{ github.event.pull_request.head.sha }}
secrets:
DOCKER_HUB_USERNAME: ${{ vars.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
upgrade-or-install-deployment:
name: Upgrade or install deployment
needs: build-and-push
uses: ./.github/workflows/reusable-dev-deployment.yml
with:
name: pr${{ github.event.pull_request.number }}
sha: ${{ github.event.pull_request.head.sha }}
env: feature-branch
pr_number: ${{ github.event.pull_request.number }}
dropDBOnUninstall: true
secrets: inherit