From f55ea6a193248766569126463e3ecbc4cf1b80cf Mon Sep 17 00:00:00 2001 From: LongYinan Date: Thu, 6 Jan 2022 14:54:56 +0800 Subject: [PATCH] ci: add debian-zig docker image --- .github/workflows/docker.yaml | 8 ++++++++ debian-zig.Dockerfile | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 debian-zig.Dockerfile diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 42e91470..f4a6cce5 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -41,6 +41,14 @@ jobs: push: true tags: ghcr.io/${{ github.repository }}/nodejs-rust:lts-debian + - name: Build and push debian with zig + uses: docker/build-push-action@v2 + with: + file: debian-zig.Dockerfile + platforms: linux/amd64 + push: true + tags: ghcr.io/${{ github.repository }}/nodejs-rust:lts-debian-zig + build_image_arm: name: Build Node.js arm images strategy: diff --git a/debian-zig.Dockerfile b/debian-zig.Dockerfile new file mode 100644 index 00000000..d54815e4 --- /dev/null +++ b/debian-zig.Dockerfile @@ -0,0 +1,9 @@ +FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian + +ARG ZIG_VERSION=0.9.0 + +RUN wget https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \ + tar -xvf zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \ + mv zig-linux-x86_64-${ZIG_VERSION} /usr/local/zig && \ + ln -sf /usr/local/zig/zig /usr/local/bin/zig && \ + rm zig-linux-x86_64-${ZIG_VERSION}.tar.xz