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:
|
2024-02-18 14:42:10 +09:00
|
|
|
build-alpine-image:
|
|
|
|
name: Build alpine image
|
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
|
|
|
|
2024-02-18 14:42:10 +09:00
|
|
|
build-debian-image:
|
|
|
|
name: Build debian image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ secrets.GH_CONTAINER_UNAME }}
|
|
|
|
password: ${{ secrets.GH_TOKEN }}
|
|
|
|
|
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
|
|
|
|
2024-02-18 14:42:10 +09:00
|
|
|
build-debian-aarch64-image:
|
|
|
|
name: Build debian image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ secrets.GH_CONTAINER_UNAME }}
|
|
|
|
password: ${{ secrets.GH_TOKEN }}
|
|
|
|
|
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
|
2024-02-18 14:42:10 +09:00
|
|
|
options: '--platform linux/arm64 --user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/lib/llvm-18:/usr/lib/llvm-18'
|
2023-03-12 18:25:53 +09:00
|
|
|
run: >-
|
|
|
|
apt-get update &&
|
|
|
|
apt-get install -y wget gnupg2 &&
|
|
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - &&
|
2024-02-18 14:42:10 +09:00
|
|
|
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" >> /etc/apt/sources.list &&
|
|
|
|
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" >> /etc/apt/sources.list &&
|
2023-03-12 18:25:53 +09:00
|
|
|
apt-get update &&
|
2024-02-18 14:42:10 +09:00
|
|
|
apt-get install libc++-18-dev libc++abi-18-dev -y --fix-missing --no-install-recommends &&
|
|
|
|
rm /usr/lib/llvm-18/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
|
|
|
|
2024-02-18 14:42:10 +09:00
|
|
|
build-zig-image:
|
|
|
|
name: Build zig image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
- build-alpine-image
|
|
|
|
- build-debian-image
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
|
|
|
|
- name: Setup Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ secrets.GH_CONTAINER_UNAME }}
|
|
|
|
password: ${{ secrets.GH_TOKEN }}
|
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
|