keep fixing CI 2

This commit is contained in:
irving
2025-10-04 00:31:32 -04:00
parent 29aa005b87
commit 7e07dfa816

View File

@@ -13,14 +13,34 @@ on:
jobs: jobs:
docker: docker:
# Match your current runner label and provide a container with Node + Docker CLI
runs-on: docker runs-on: docker
container: container:
image: peipei-ci:latest image: debian:bookworm-slim
options: --privileged -v /var/run/docker.sock:/var/run/docker.sock options: --privileged -v /var/run/docker.sock:/var/run/docker.sock
steps: steps:
- name: Checkout - name: Prepare tools via Tencent mirrors (apt)
uses: actions/checkout@v3 shell: bash
run: |
sed -i 's|deb.debian.org|mirrors.tencent.com|g; s|security.debian.org|mirrors.tencent.com|g' /etc/apt/sources.list
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates curl git docker.io
docker version
git --version
- name: Checkout repository (git)
env:
REPO: ${{ github.repository }}
SERVER: ${{ github.server_url }}
SHA: ${{ github.sha }}
shell: bash
run: |
set -euo pipefail
echo "Cloning $SERVER/$REPO at $SHA"
git clone --depth=1 "$SERVER/$REPO" /workspace
cd /workspace
git fetch --depth=1 origin "$SHA" || true
git checkout -q "$SHA" || true
- name: Ensure buildx is available - name: Ensure buildx is available
shell: bash shell: bash
@@ -34,8 +54,10 @@ jobs:
TAG: ${{ github.sha }} TAG: ${{ github.sha }}
shell: bash shell: bash
run: | run: |
cd /workspace/peipei-backend
docker buildx build \ docker buildx build \
--platform linux/amd64 \ --platform linux/amd64 \
--build-arg MIRROR_REG=docker.m.daocloud.io/library/ \
-f docker/Dockerfile \ -f docker/Dockerfile \
-t ${REGISTRY}/peipei/backend:${TAG} \ -t ${REGISTRY}/peipei/backend:${TAG} \
-t ${REGISTRY}/peipei/backend:latest \ -t ${REGISTRY}/peipei/backend:latest \