diff --git a/.github/workflows/build_libzim_wasm.yml b/.github/workflows/build_libzim_wasm.yml index e7b63c9..fbe24d0 100644 --- a/.github/workflows/build_libzim_wasm.yml +++ b/.github/workflows/build_libzim_wasm.yml @@ -42,6 +42,7 @@ env: DISPATCH_TYPE: ${{ github.event.inputs.buildtype }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SSH_KEY: ${{ secrets.SSH_KEY }} + BUILD_TYPE: ${{ github.event.inputs.buildtype }} jobs: build: @@ -51,7 +52,13 @@ jobs: - uses: actions/checkout@v3 # Customizes the Emscripten docker container via the Dockerfile in this repo - name: Build the Docker image - run: docker build -t "docker-emscripten-libzim:v3" ./docker + run: | + if [[ $BUILD_TYPE =~ 'source' ]]; then + BUILD_VERSION='3.1.12' + else + BUILD_VERSION='3.1.41' + fi + docker build -t "docker-emscripten-libzim:v3" ./docker --build-arg VERSION=$BUILD_VERSION # If we're building release version - name: Build release from libzim binaries if: github.event_name == 'pull_request' || github.event_name == 'push' || github.event.inputs.buildtype == 'release' diff --git a/docker/Dockerfile b/docker/Dockerfile index e6d0a79..5cd96c8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,6 @@ # Docker image suitable to build libzim & kiwixlib with emscripten -FROM emscripten/emsdk:3.1.41 +ARG VERSION +FROM emscripten/emsdk:${VERSION} # Install build tools RUN apt-get update && apt-get install -y --no-install-recommends wget ninja-build pkg-config python3 autopoint libtool autoconf patch g++ locales curl git \