-
Notifications
You must be signed in to change notification settings - Fork 44
46 lines (42 loc) · 1.12 KB
/
CD.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: Build Docker Image
on:
push:
branches:
- staging
- frick
- frack
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set Heroku app name based on branch
id: set-heroku-app-name
run: |
BRANCH_NAME=${GITHUB_REF##*/}
case $BRANCH_NAME in
frick)
APP_NAME="commonwealth-frick"
;;
frack)
APP_NAME="commonwealth-frack"
;;
staging)
APP_NAME="commonwealth-beta"
;;
demo)
APP_NAME="commonwealth-demo"
;;
*)
echo "Branch $BRANCH_NAME is not configured for deployment."
exit 1
;;
esac
echo "HEROKU_APP_NAME=$APP_NAME" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_TOKEN}}
heroku_app_name: ${{ env.HEROKU_APP_NAME }}
heroku_email: ${{secrets.HEROKU_EMAIL}}
stack: "container"
usedocker: true