keep fixing CI 2
This commit is contained in:
@@ -13,14 +13,34 @@ on:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
# Match your current runner label and provide a container with Node + Docker CLI
|
||||
runs-on: docker
|
||||
container:
|
||||
image: peipei-ci:latest
|
||||
image: debian:bookworm-slim
|
||||
options: --privileged -v /var/run/docker.sock:/var/run/docker.sock
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Prepare tools via Tencent mirrors (apt)
|
||||
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
|
||||
shell: bash
|
||||
@@ -34,8 +54,10 @@ jobs:
|
||||
TAG: ${{ github.sha }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd /workspace/peipei-backend
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--build-arg MIRROR_REG=docker.m.daocloud.io/library/ \
|
||||
-f docker/Dockerfile \
|
||||
-t ${REGISTRY}/peipei/backend:${TAG} \
|
||||
-t ${REGISTRY}/peipei/backend:latest \
|
||||
|
||||
Reference in New Issue
Block a user