napi-rs/.github/workflows/docker.yaml

108 lines
3 KiB
YAML
Raw Normal View History

name: Docker nightly build
on:
schedule:
2022-10-24 13:08:58 +09:00
- cron: '0 0 1 * *'
jobs:
build_image:
2021-09-28 14:11:28 +09:00
name: Build nodejs-rust:lts
runs-on: ubuntu-latest
steps:
2022-04-01 15:29:51 +09:00
- uses: actions/checkout@v3
2021-03-31 15:32:53 +09:00
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
2021-03-31 15:32:53 +09:00
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
2021-03-31 15:47:13 +09:00
- name: Login to GitHub Container Registry
2021-03-31 15:32:53 +09:00
uses: docker/login-action@v1
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
2021-03-31 15:32:53 +09:00
uses: docker/build-push-action@v2
with:
file: alpine.Dockerfile
platforms: linux/amd64
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
uses: docker/build-push-action@v2
with:
file: debian.Dockerfile
platforms: linux/amd64
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
- name: Build and push debian aarch64 cross
uses: docker/build-push-action@v2
with:
file: debian-aarch64.Dockerfile
platforms: linux/amd64
push: true
2022-09-09 19:54:23 +09:00
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
2022-01-06 15:54:56 +09:00
- name: Build and push debian with zig
uses: docker/build-push-action@v2
with:
file: debian-zig.Dockerfile
platforms: linux/amd64
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
uses: docker/build-push-action@v2
with:
file: alpine-zig.Dockerfile
platforms: linux/amd64
push: true
2022-09-09 19:54:23 +09:00
tags: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine-zig
2022-01-18 14:41:44 +09:00
2021-10-20 01:54:31 +09:00
build_image_arm:
name: Build Node.js arm images
strategy:
fail-fast: false
matrix:
2022-06-30 20:42:54 +09:00
version: ['14', '16', '18']
2021-10-20 01:54:31 +09:00
runs-on: ubuntu-latest
steps:
2022-04-01 15:29:51 +09:00
- uses: actions/checkout@v3
2021-10-20 01:54:31 +09:00
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_CONTAINER_UNAME }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push armhf
uses: docker/build-push-action@v2
with:
file: armhf.Dockerfile
push: true
2022-09-09 19:54:23 +09:00
tags: ghcr.io/napi-rs/napi-rs/nodejs:armhf-${{ matrix.version }}
2021-10-20 01:54:31 +09:00
build-args: |
NODE_VERSION=${{ matrix.version }}
- name: Build and push aarch64
uses: docker/build-push-action@v2
with:
file: aarch64.Dockerfile
push: true
2022-09-09 19:54:23 +09:00
tags: ghcr.io/napi-rs/napi-rs/nodejs:aarch64-${{ matrix.version }}
2021-10-20 01:54:31 +09:00
build-args: |
NODE_VERSION=${{ matrix.version }}