-
Notifications
You must be signed in to change notification settings - Fork 15
65 lines (56 loc) · 1.83 KB
/
docker-build.yaml
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
name: Build Docker Containers
on:
push:
branches: main
pull_request:
branches: main
workflow_dispatch: # allows manual trigger
jobs:
build:
name: Building Docker Containers
# Don't run on draft pull requests
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
strategy:
matrix:
image:
- {dir: euroe-demo, dockerfile: scripts/Dockerfile}
- {dir: ., dockerfile: gallery/Dockerfile}
- {dir: signMessage, dockerfile: Dockerfile}
- {dir: simpleAgeVerification, dockerfile: Dockerfile}
- {dir: ., dockerfile: sponsoredTransactions/Dockerfile}
- {dir: ., dockerfile: sponsoredTransactionsAuction/Dockerfile}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build image
working-directory: ${{ matrix.image.dir }}
run:
docker build -f ${{ matrix.image.dockerfile }} .
compose-build:
name: Building with docker compose
# Don't run on draft pull requests
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
strategy:
matrix:
directories:
- trackAndTrace
- compliant-reward-distribution
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build with docker compose
working-directory: ${{ matrix.directories }}
env:
# Dummy values are set for the `trackAndTrace` run because `docker compose build`
# enforces the presence of environment variables during the build phase,
# even though these variables are only needed at runtime.
TRACK_AND_TRACE_CONTRACT_ADDRESS: "<8351,0>"
TRACK_AND_TRACE_PRIVATE_KEY_FILE: "./trackAndTrace/README.md"
run:
docker compose build