mirror of
https://github.com/certd/certd.git
synced 2026-04-28 16:17:25 +08:00
chore: build-node-base-image
This commit is contained in:
@@ -0,0 +1,56 @@
|
|||||||
|
name: build-node-base-image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ['v2-dev']
|
||||||
|
paths:
|
||||||
|
- "scripts/build/Dockerfile"
|
||||||
|
# workflow_run:
|
||||||
|
# workflows: [ "deploy-demo" ]
|
||||||
|
# types:
|
||||||
|
# - completed
|
||||||
|
|
||||||
|
# schedule:
|
||||||
|
# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
|
||||||
|
# - cron: '17 19 * * *'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-node-base-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.dockerhub_username }}
|
||||||
|
password: ${{ secrets.dockerhub_password }}
|
||||||
|
|
||||||
|
- name: Build default platforms
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
context: ./scripts/build/
|
||||||
|
tags: |
|
||||||
|
greper/node-base:22-alpine-1
|
||||||
|
- name: Build armv7
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
platforms: linux/arm/v7
|
||||||
|
push: true
|
||||||
|
context: ./scripts/build/
|
||||||
|
tags: |
|
||||||
|
greper/node-base:22-alpine-1-armv7
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
FROM node:22-alpine AS builder
|
||||||
|
|
||||||
|
RUN apk add build-base
|
||||||
|
RUN wget -O - https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 | tar -xj && \
|
||||||
|
cd jemalloc-5.3.0 && \
|
||||||
|
./configure && \
|
||||||
|
make && \
|
||||||
|
make install
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
version: '3.3' # 指定docker-compose 版本
|
||||||
|
services: # 要拉起的服务们
|
||||||
|
node-base:
|
||||||
|
build:
|
||||||
|
context: ./
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: greper/node-base:22-alpine-1
|
||||||
|
|
||||||
Reference in New Issue
Block a user