generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 76
66 lines (56 loc) · 2.41 KB
/
docker.yml
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
57
58
59
60
61
62
63
64
65
66
name: Docker nightly build
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
build_image:
name: Build Docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Download aom-dev
run: |
wget https://github.com/Brooooooklyn/canvas/releases/download/libaom-v3.5.0/aom-aarch64-linux-musl.tar
tar -xvf aom-aarch64-linux-musl.tar
rm aom-aarch64-linux-musl.tar
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.GH_CONTAINER_UNAME }}
password: ${{ secrets.GH_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: addnab/docker-run-action@v3
with:
image: ubuntu:jammy
options: '--platform linux/arm64 --user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/lib/llvm-18:/usr/lib/llvm-18'
run: >-
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-18 main" >> /etc/apt/sources.list &&
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" >> /etc/apt/sources.list &&
apt-get update &&
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 &&
rm /usr/lib/llvm-18/lib/libunwind.so &&
rm /usr/lib/llvm-18/lib/libc++.so
- name: Build and push Linux aarch64
uses: docker/build-push-action@v6
with:
file: aarch64.Dockerfile
context: .
platforms: linux/amd64
push: true
tags: ghcr.io/brooooooklyn/canvas/ubuntu-builder:jammy-aarch64