-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (87 loc) · 2.95 KB
/
build-all.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
83
84
85
86
87
88
89
90
91
name: Building All Containers
on:
push:
branches: [ 'main' ]
tags:
- 'v*'
pull_request:
branches: [ 'main' ]
workflow_dispatch:
jobs:
build_api:
name: Build api
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Meta API Image
id: meta_api
uses: docker/metadata-action@v3
with:
images: ghcr.io/european-epc-competence-center/vc-verifier/vc_verifier_api
flavor: |
onlatest=true
latest=auto
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=VC Verifier API
org.opencontainers.image.description=API container of the verifiable credential verifier service.
org.opencontainers.image.vendor=EECC
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: ./api
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_api.outputs.tags }}
labels: ${{ steps.meta_api.outputs.labels }}
build_frontend:
name: Build frontend
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Meta Frontend Image
id: meta_frontend
uses: docker/metadata-action@v3
with:
images: ghcr.io/european-epc-competence-center/vc-verifier/vc_verifier_frontend
flavor: |
onlatest=true
latest=auto
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
labels: |
org.opencontainers.image.title=VC Verifier Frontend
org.opencontainers.image.description=Frontend container of the verifiable credential verifier service.
org.opencontainers.image.vendor=EECC
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: ./frontend
build-args: |
PUBLIC_PATH=verifier
NODE_ENV=production
BASE_URL=https://ssi.eecc.de
VERIFIER_API=https://ssi.eecc.de/api/verifier
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_frontend.outputs.tags }}
labels: ${{ steps.meta_frontend.outputs.labels }}