-
Notifications
You must be signed in to change notification settings - Fork 25
67 lines (63 loc) · 2.12 KB
/
docker-image.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
APP_SETTINGS: project.config.DevelopmentConfig
SECRET_KEY: mysecret
MAIL_SERVER: smtp.googlemail.com
MAIL_PORT: 465
MAIL_USERNAME: my_email@my_email_domain.com
MAIL_PASSWORD: my_email_password
MAIL_DEFAULT_SENDER: my_email@my_email_domain.com
TWILIO_ACCOUNT_SID: 1234qwer
TWILIO_AUTH_TOKEN: qwer1234
TWILIO_FROM_NUMBER: +123456789
CELLPHONE_VALIDATION_CODE_EXP_SECS: 600
MAIL_USE_TLS: False
MAIL_USE_SSL: True
FCM_SERVER_KEY: 9876oiuy
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Docker Compose Build
working-directory: ./flask-main
continue-on-error: false
run: docker-compose build
# - name: Cache multiple paths
# uses: actions/cache@v2
# with:
# path: |
# flask-main/docker-compose.yml
# key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Docker Compose Up
working-directory: ./flask-main
continue-on-error: false
run: docker-compose up -d
- name: Docker Ps
run: docker ps
- name: Run Tests
working-directory: ./flask-main
continue-on-error: false
run: docker-compose exec -T flask-api python manage.py test
# - name: Run Tests using Script
# working-directory: ./flask-main
# shell: bash
# continue-on-error: false
# run: |
# chmod +x "${GITHUB_WORKSPACE}/.github/scripts/script.sh"
# "${GITHUB_WORKSPACE}/.github/scripts/script.sh"