generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 96
56 lines (47 loc) · 2.18 KB
/
docker.yml
File metadata and controls
56 lines (47 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Docker nightly build
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
permissions: {}
jobs:
build_image:
name: Build Docker images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Setup QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ secrets.GH_CONTAINER_UNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: |
docker build . --pull --no-cache -t ghcr.io/brooooooklyn/canvas/ubuntu-builder:jammy
docker build . --pull --no-cache -f musl.Dockerfile -t ghcr.io/brooooooklyn/canvas/musl-builder:lts
- name: Push docker image
run: |
docker push ghcr.io/brooooooklyn/canvas/ubuntu-builder:jammy
docker push ghcr.io/brooooooklyn/canvas/musl-builder:lts
- name: Install latest libc++-dev for cross build
uses: tj-actions/docker-run@v2
with:
image: ubuntu:jammy
name: libc-build-arm64
options: '--platform linux/arm64 --user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/lib/llvm-19:/usr/lib/llvm-19'
args: |
sh -c "apt-get update && apt-get install -y wget gnupg2 && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' >> /etc/apt/sources.list && echo 'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' >> /etc/apt/sources.list && apt-get update && apt-get install libc++-19-dev libc++abi-19-dev -y --fix-missing --no-install-recommends && rm /usr/lib/llvm-19/lib/libc++abi.so && rm /usr/lib/llvm-19/lib/libunwind.so && rm /usr/lib/llvm-19/lib/libc++.so"
- name: Build and push Linux aarch64
uses: docker/build-push-action@v7
with:
file: aarch64.Dockerfile
context: .
platforms: linux/amd64
push: true
tags: ghcr.io/brooooooklyn/canvas/ubuntu-builder:jammy-aarch64