-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (36 loc) · 1.13 KB
/
docker-build.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
name: Docker build
on:
push:
branches:
- main
pull_request:
jobs:
assets:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Build canister
uses: ./.github/actions/build
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Link the build sha to this commit"
run: |
: Set up git
git config user.name "GitHub Actions Bot"
git config user.email "<>"
: Make a note of the WASM shasum.
NOTE="refs/notes/*"
SHA="$(sha256sum < "./out/xrc.wasm.gz")"
echo $SHA
git fetch origin "+${NOTE}:${NOTE}"
if git notes --ref="wasm-sha" add -m "$SHA"
then git push origin "${NOTE}:${NOTE}" || true
else echo SHA already set
fi
- name: "Verify that the WASM module is small enough to deploy"
run: |
wasm_size="$(wc -c < "./out/xrc.wasm.gz")"
max_size=2097000
echo "WASM size: $wasm_size"
echo "Max supported size: $max_size"
(( wasm_size <= max_size )) || { echo "The WASM is too large" ; exit 1 ; }