-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (74 loc) · 2.59 KB
/
docker.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
name: Create Docker Image
on:
push:
tags:
- '*'
jobs:
build_local_dev_docker_image:
timeout-minutes: 15
name: Build docker images (dev and prod).
runs-on: ubuntu-latest
strategy:
matrix:
include:
# production image
- graphql_url: https://api.unikube.io/graphql
keycloak_url: https://login.unikube.io/auth
upload_url: https://api.unikube.io/upload
tag_suffix: ''
# dev image
- graphql_url: http://gateway.unikube.127.0.0.1.nip.io:8085/graphql
keycloak_url: http://keycloak.127.0.0.1.nip.io:8085/auth
upload_url: http://gateway.unikube.127.0.0.1.nip.io:8085/upload
tag_suffix: '-dev'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to quay.io
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Docker meta
uses: docker/metadata-action@v3
id: meta
with:
images: quay.io/unikube/frontend
flavor: |
latest=false
suffix=${{ matrix.tag_suffix }}
tags: |
type=semver,pattern={{version}}
latest
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
secrets: |
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
file: docker/Dockerfile
context: .
build-args: |
VUE_APP_BASE_URL
VUE_APP_PUBLIC_PATH
VUE_APP_I18N_LOCALE=en
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_KEYCLOAK_JS=/js/keycloak.js
VUE_APP_KEYCLOAK_AUTHZ_JS=/js/keycloak-authz.js
VUE_APP_KEYCLOAK_REALM=unikube
VUE_APP_KEYCLOAK_CLIENT_ID=frontend
VUE_APP_GRAPHQL_URL=${{ matrix.graphql_url }}
VUE_APP_KEYCLOAK_URL=${{ matrix.keycloak_url }}
VUE_APP_UPLOAD_URL=${{ matrix.upload_url }}
VUE_APP_VERSION=${{ steps.meta.outputs.version }}
SENTRY_RELEASE=${{ steps.meta.outputs.version }}
VUE_APP_SENTRY_DSN=${{ secrets.SENTRY_DSN }}
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }}
SENTRY_URL=${{ secrets.SENTRY_URL }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}