2020-06-10 19:55:40 +09:00
|
|
|
name: Docker nightly build
|
|
|
|
|
|
|
|
on:
|
2021-04-12 12:10:50 +09:00
|
|
|
schedule:
|
2022-10-24 13:08:58 +09:00
|
|
|
- cron: '0 0 1 * *'
|
2023-03-12 18:25:53 +09:00
|
|
|
workflow_dispatch:
|
2020-06-10 19:55:40 +09:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_image:
|
2021-09-28 14:11:28 +09:00
|
|
|
name: Build nodejs-rust:lts
|
2020-06-10 19:55:40 +09:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-09-04 23:34:40 +09:00
|
|
|
- uses: actions/checkout@v4
|
2020-06-10 19:55:40 +09:00
|
|
|
|
2021-03-31 15:32:53 +09:00
|
|
|
- name: Setup QEMU
|
2023-09-14 06:15:18 +09:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2020-06-10 19:55:40 +09:00
|
|
|
|
2021-03-31 15:32:53 +09:00
|
|
|
- name: Setup Docker Buildx
|
2023-09-14 06:15:28 +09:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2020-06-10 19:55:40 +09:00
|
|
|
|
2021-03-31 15:47:13 +09:00
|
|
|
- name: Login to GitHub Container Registry
|
2023-09-14 06:13:36 +09:00
|
|
|
uses: docker/login-action@v3
|
2021-03-31 15:32:53 +09:00
|
|
|
with:
|
2021-03-31 15:47:13 +09:00
|
|
|
registry: ghcr.io
|
2021-04-11 15:09:45 +09:00
|
|
|
username: ${{ secrets.GH_CONTAINER_UNAME }}
|
2021-04-08 11:48:41 +09:00
|
|
|
password: ${{ secrets.GH_TOKEN }}
|
2021-03-31 15:32:53 +09:00
|
|
|
|
2021-04-12 12:00:04 +09:00
|
|
|
- name: Build and push alpine
|
2023-09-14 06:15:05 +09:00
|
|
|
uses: docker/build-push-action@v5
|
2021-03-31 15:32:53 +09:00
|
|
|
with:
|
|
|
|
file: alpine.Dockerfile
|
2023-09-18 09:29:15 +09:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-03-31 15:32:53 +09:00
|
|
|
push: true
|
2022-09-09 19:54:23 +09:00
|
|
|
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
2021-04-12 12:00:04 +09:00
|
|
|
|
|
|
|
- name: Build and push debian
|
2023-09-14 06:15:05 +09:00
|
|
|
uses: docker/build-push-action@v5
|
2021-04-12 12:00:04 +09:00
|
|
|
with:
|
|
|
|
file: debian.Dockerfile
|
2023-09-18 09:29:15 +09:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-04-12 12:00:04 +09:00
|
|
|
push: true
|
2022-09-09 19:54:23 +09:00
|
|
|
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
2021-10-20 01:54:31 +09:00
|
|
|
|
2023-03-12 18:25:53 +09:00
|
|
|
- name: Install latest libc++-dev for cross build
|
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
|
with:
|
|
|
|
image: node:lts-slim
|
|
|
|
options: '--platform linux/arm64 --user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/lib/llvm-15:/usr/lib/llvm-15'
|
|
|
|
run: >-
|
|
|
|
apt-get update &&
|
|
|
|
apt-get install -y wget gnupg2 &&
|
|
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - &&
|
2023-11-14 10:58:58 +09:00
|
|
|
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" >> /etc/apt/sources.list &&
|
|
|
|
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" >> /etc/apt/sources.list &&
|
2023-03-12 18:25:53 +09:00
|
|
|
apt-get update &&
|
2023-11-14 10:58:58 +09:00
|
|
|
apt-get install libc++-16-dev libc++abi-16-dev -y --fix-missing --no-install-recommends &&
|
|
|
|
rm /usr/lib/llvm-16/lib/libc++abi.so
|
2023-03-12 18:25:53 +09:00
|
|
|
|
2022-05-03 17:38:30 +09:00
|
|
|
- name: Build and push debian aarch64 cross
|
2023-09-14 06:15:05 +09:00
|
|
|
uses: docker/build-push-action@v5
|
2022-05-03 17:38:30 +09:00
|
|
|
with:
|
|
|
|
file: debian-aarch64.Dockerfile
|
2023-09-18 09:29:15 +09:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-05-03 17:38:30 +09:00
|
|
|
push: true
|
2022-09-09 19:54:23 +09:00
|
|
|
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
|
2023-03-12 18:50:38 +09:00
|
|
|
context: .
|
2022-05-03 17:38:30 +09:00
|
|
|
|
2023-03-12 18:25:53 +09:00
|
|
|
- name: Cleanup
|
2023-03-12 19:24:48 +09:00
|
|
|
run: sudo rm -rf "${{ github.workspace }}/lib"
|
2023-03-12 18:25:53 +09:00
|
|
|
|
2022-01-06 15:54:56 +09:00
|
|
|
- name: Build and push debian with zig
|
2023-09-14 06:15:05 +09:00
|
|
|
uses: docker/build-push-action@v5
|
2022-01-06 15:54:56 +09:00
|
|
|
with:
|
|
|
|
file: debian-zig.Dockerfile
|
2023-09-18 09:29:15 +09:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-01-06 15:54:56 +09:00
|
|
|
push: true
|
2022-09-09 19:54:23 +09:00
|
|
|
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-zig
|
2022-01-06 15:54:56 +09:00
|
|
|
|
2022-01-18 14:41:44 +09:00
|
|
|
- name: Build and push alpine with zig
|
2023-09-14 06:15:05 +09:00
|
|
|
uses: docker/build-push-action@v5
|
2022-01-18 14:41:44 +09:00
|
|
|
with:
|
|
|
|
file: alpine-zig.Dockerfile
|
2023-09-18 09:29:15 +09:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-01-18 14:41:44 +09:00
|
|
|
push: true
|
2022-09-09 19:54:23 +09:00
|
|
|
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine-zig
|