-
Notifications
You must be signed in to change notification settings - Fork 9
82 lines (78 loc) · 2.45 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
76
77
78
79
80
81
82
name: Build docker image for subsequent jobs
on:
push:
tags:
- "*"
# For manually rebuilding the images
workflow_dispatch:
inputs:
octez-tag:
description: "tezos/tezos docker tag to be used"
required: true
type: string
workflow_call:
inputs:
octez-tag:
description: "tezos/tezos docker tag to be used"
required: true
type: string
outputs:
jstz-cli:
description: "jstz docker image tag"
value: ${{ jobs.build-image.outputs.tag }}
jstz-rollup:
description: "jstz-rollup docker image tag"
value: ${{ jobs.build-image.outputs.tag }}
jstz-node:
description: "jstz-node docker image tag"
value: ${{ jobs.build-image.outputs.tag }}
jstzd:
description: "jstzd docker image tag"
value: ${{ jobs.build-image.outputs.tag }}
jobs:
set-octez-tag:
name: Set octez tag for workflows triggered by tags
runs-on: ubuntu-latest
outputs:
octez-tag: ${{ steps.run.outputs.OCTEZ_TAG }}
steps:
- id: run
run: |
input_tag=${{ inputs.octez-tag }}
octez_tag=${input_tag:-"master_d21359af_20241220171048"}
echo "OCTEZ_TAG=${octez_tag}" >> ${GITHUB_OUTPUT}
build-kernel:
name: Build (Kernel)
runs-on: [x86_64, linux, nix]
steps:
- uses: actions/checkout@v4
- run: nix --version
- name: Format
run: nix --accept-flake-config fmt -- --fail-on-change
- name: Prevent blst
run: nix --accept-flake-config develop -j auto --command sh -c '[ -z "$(cargo tree | grep blst)" ]'
- name: Build
run: nix --accept-flake-config --log-format raw -L build -j auto .#jstz_kernel
- name: Upload kernel
id: upload-kernel
uses: actions/upload-artifact@v4
with:
name: jstz-kernel
path: result/lib/jstz_kernel.wasm
build-image:
name: Build image
needs: [build-kernel, set-octez-tag]
strategy:
matrix:
include:
- image: jstz-rollup
dockerfile: ./crates/jstz_rollup/Dockerfile
uses: jstz-dev/jstz/.github/workflows/docker-multiplatform.yml@huanchengchang-jstz-286
with:
octez-tag: ${{ needs.set-octez-tag.outputs.octez-tag }}
docker_registry: ghcr.io
docker_image_base: jstz-dev/jstz
image: ${{ matrix.image }}
dockerfile: ${{ matrix.dockerfile }}
kernel_artifact_name: jstz-kernel
secrets: inherit