-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (81 loc) · 2.52 KB
/
docker-build.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build Docker Images
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- develop
jobs:
docker-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Environment Variables
run: |
TAG=${{ github.ref_name }}
PUSH=true
echo ${{ github.ref }}
if [[ ${{ github.ref }} != 'refs/heads/master' && ${{ github.ref }} != 'refs/heads/develop' ]]; then
PUSH=false
TAG=temp
fi
echo "PUSH: $PUSH"
echo "DOCKER TAG: $TAG"
echo "PUSH=$PUSH" >> $GITHUB_ENV
echo "TAG=$TAG" >> $GITHUB_ENV
- uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
if: env.PUSH == 'true'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "Build (and push) Postgraphile"
uses: docker/build-push-action@v3
with:
context: postgraphile
push: ${{ env.PUSH }}
tags: dzynetech/smart-postgraphile:${{ env.TAG }}
timeout-minutes: 240
- name: "Build (and push) Ingest"
uses: docker/build-push-action@v3
with:
context: python/ingest_server
push: ${{ env.PUSH }}
tags: dzynetech/smart-ingest:${{ env.TAG }}
timeout-minutes: 240
- name: "Build (and push) Moviegen"
uses: docker/build-push-action@v3
with:
context: python/moviegen
push: ${{ env.PUSH }}
tags: dzynetech/smart-moviegen:${{ env.TAG }}
timeout-minutes: 240
- name: "Build (and push) Geocode"
uses: docker/build-push-action@v3
with:
context: python/geocode
push: ${{ env.PUSH }}
tags: dzynetech/smart-geocode:${{ env.TAG }}
timeout-minutes: 240
- name: "Build (and push) dev UI"
uses: docker/build-push-action@v3
with:
context: frontend
file: frontend/Dockerfile.dev
push: ${{ env.PUSH }}
tags: dzynetech/smart-ui-dev:${{ env.TAG }}
timeout-minutes: 240
- name: "Build (and push) prod UI"
uses: docker/build-push-action@v3
with:
context: frontend
build-args: |
commit_hash=${{ github.SHA }}
push: ${{ env.PUSH }}
tags: dzynetech/smart-ui:${{ env.TAG }}
timeout-minutes: 240