tpre-python/.gitea/workflows/build-image.yaml
sangge-redmi 06aa815950
Some checks failed
Build and Push Base Image / build-and-push (push) Failing after 56s
add compile dependency
2025-01-16 10:27:26 +08:00

75 lines
1.8 KiB
YAML

name: Build and Push Base Image
on:
push:
paths:
- "basedockerfile"
- ".gitea/workflows/build-image.yaml"
schedule:
- cron: "0 0 1 * *" # 每月1号00:00执行
env:
REGISTRY: git.mamahaha.work
IMAGE_NAME: tpre
jobs:
build-and-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: https://git.mamahaha.work/actions/checkout@v4
with:
submodules: "recursive"
- name: Install build dependencies
run: |
apt-get update
apt-get install -y build-essential cmake git
# 编译 GMSSL
- name: Build GMSSL
run: |
cd gmssl
mkdir build
cd build
cmake ..
make
# 复制库文件
- name: Copy library files
run: |
mkdir -p ./lib
cd gmssl/build/bin
cp libgmssl.so \
libgmssl.so.3 \
libgmssl.so.3.1 \
libsdf_dummy.so \
libsdf_dummy.so.3 \
libsdf_dummy.so.3.1 \
libskf_dummy.so \
libskf_dummy.so.3 \
libskf_dummy.so.3.1 \
../../lib/
- name: Set up Docker Buildx
uses: https://git.mamahaha.work/actions/setup-buildx-action@v3
- name: Login to Private Registry
uses: https://git.mamahaha.work/actions/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Build and push
uses: https://git.mamahaha.work/actions/build-push-action@v5
with:
context: .
file: basedockerfile
push: true
tags: |
${{ env.REGISTRY }}/sangge/${{ env.IMAGE_NAME }}:base