-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (47 loc) · 1.52 KB
/
build_bitacross.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
name: Build bitacross-worker
on:
push
env:
CARGO_TERM_COLOR: always
DOCKER_BUILDKIT: 1
jobs:
build-worker:
runs-on: tee-prod-builder
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.sha }}
fetch-depth: 0
- name: Build local builder
uses: docker/build-push-action@v5
with:
context: .
file: bitacross-worker/build.Dockerfile
tags: local-builder:${{ github.event.inputs.ref || github.sha }}
target: builder
build-args: |
WORKER_MODE_ARG=offchain-worker
SGX_MODE=HW
ADDITIONAL_FEATURES_ARG=
IMAGE_FOR_RELEASE=true
SGX_PRODUCTION=1
SGX_COMMERCIAL_KEY=/opt/enclave_release/sgx_sign_key.pem
- name: Build worker
uses: docker/build-push-action@v5
with:
context: .
file: bitacross-worker/build.Dockerfile
tags: litentry/bitacross-worker:${{ github.event.inputs.ref || github.sha }}
target: deployed-worker
- name: Dockerhub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# - name: Push worker image
# run: |
# docker push litentry/bitacross-worker:${{ github.event.inputs.ref || github.ref }}
- name: Fail early
if: failure()
uses: andymckay/[email protected]