File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 44name : Build Wasm Examples
55
66on :
7+ workflow_dispatch : {}
78 workflow_call :
89 inputs :
9- docs_only :
10- description : Skip building if docs only
11- required : false
12- type : string
13- default : " false"
10+ docs_only :
11+ description : Skip building if docs only
12+ required : false
13+ type : string
14+ default : " false"
15+ schedule :
16+ # Run at 1am UTC daily
17+ - cron : ' 0 1 * * *'
1418
1519permissions :
1620 packages : write
1721 contents : read
1822
1923jobs :
2024 build-wasm-examples :
21- if : ${{ inputs.docs_only == 'false' }}
25+ if : ${{ inputs.docs_only == 'false' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
2226 runs-on : ubuntu-latest
2327 steps :
2428 - uses : actions/checkout@v4
@@ -48,14 +52,13 @@ jobs:
4852 with :
4953 images : ${{ github.repository_owner }}/wasm-clang-builder
5054 - name : Build and push wasm-clang-builder
51- # depedabot does not have push access to update the wasm-clang-builder image
52- if : github.actor != 'dependabot[bot]'
55+ # Only push if not from a fork, not from pull request, and not from dependabot
5356 uses : docker/build-push-action@v6
5457 with :
5558 context : src/wasmsamples
5659 file : src/wasmsamples/dockerfile
5760 load : true
58- push : true
61+ push : ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) && github.actor != 'dependabot[bot]' }}
5962 build-args : |
6063 WASI_SDK_VERSION_FULL=20.0
6164 GCC_VERSION=12
Original file line number Diff line number Diff line change 2929 echo This will take a while if it is the first time you are building the docker image.
3030 echo Log in ${OUTPUT_DIR} /dockerbuild.log
3131
32- docker pull ghcr.io/deislabs /wasm-clang-builder:latest
32+ docker pull ghcr.io/hyperlight-dev /wasm-clang-builder:latest
3333
34- docker build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=20.0 --cache-from ghcr.io/deislabs /wasm-clang-builder:latest -t wasm-clang-builder:latest . 2> ${OUTPUT_DIR} /dockerbuild.log
34+ docker build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=20.0 --cache-from ghcr.io/hyperlight-dev /wasm-clang-builder:latest -t wasm-clang-builder:latest . 2> ${OUTPUT_DIR} /dockerbuild.log
3535
3636 for FILENAME in $( find . -name ' *.c' )
3737 do
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ where docker || (
1414 set " dockeroutput = $(wslpath '%~2 ')"
1515)
1616
17- %dockercmd% pull ghcr.io/deislabs /wasm-clang-builder:latest
17+ %dockercmd% pull ghcr.io/hyperlight-dev /wasm-clang-builder:latest
1818
1919echo Building docker image that has Wasm sdk. Should be quick if no changes to docker image.
2020echo Log in %2 \dockerbuild.log
21- %dockercmd% build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=20.0 --cache-from ghcr.io/deislabs /wasm-clang-builder:latest -t wasm-clang-builder:latest !dockerinput! 2 > %2 dockerbuild.log
21+ %dockercmd% build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=20.0 --cache-from ghcr.io/hyperlight-dev /wasm-clang-builder:latest -t wasm-clang-builder:latest !dockerinput! 2 > %2 dockerbuild.log
2222
2323echo Building Wasm files in %1 and output to %2
2424for /R " %1 " %%i in (*.c) do (
Original file line number Diff line number Diff line change 11FROM ubuntu
22ENV DEBIAN_FRONTEND=noninteractive
3- LABEL org.opencontainers.image.source=https://github.com/deislabs /hyperlight-wasm
3+ LABEL org.opencontainers.image.source=https://github.com/hyperlight-dev /hyperlight-wasm
44
55ARG GCC_VERSION=12
66
@@ -19,4 +19,4 @@ RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WA
1919 && tar xvf wasi-sdk-${WASI_SDK_VERSION_FULL}-linux.tar.gz \
2020 && rm wasi-sdk-${WASI_SDK_VERSION_FULL}-linux.tar.gz \
2121 && mv /wasi-sdk-${WASI_SDK_VERSION_FULL} /opt/wasi-sdk
22- CMD ["/bin/sh"]
22+ CMD ["/bin/sh"]
You can’t perform that action at this time.
0 commit comments