From 3a787cfd223cad1e21f5f6a554bb8701ef685295 Mon Sep 17 00:00:00 2001 From: "kim.dev.6789" Date: Thu, 15 Jan 2026 18:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2runner=20label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 4 +-- .gitea/workflows/itom-platform-auto-build.yml | 30 +++++++++++++++++-- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4055b2d..58a2c2e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -29,7 +29,7 @@ env: jobs: build-and-push: - runs-on: openim + runs-on: ubuntu-latest permissions: contents: read packages: write @@ -601,4 +601,4 @@ jobs: run: | echo "🧹 清理临时文件..." rm -f /tmp/build_*.log - echo "✅ 清理完成" \ No newline at end of file + echo "✅ 清理完成" diff --git a/.gitea/workflows/itom-platform-auto-build.yml b/.gitea/workflows/itom-platform-auto-build.yml index 351c667..bdee78a 100644 --- a/.gitea/workflows/itom-platform-auto-build.yml +++ b/.gitea/workflows/itom-platform-auto-build.yml @@ -12,7 +12,7 @@ permissions: jobs: build: - runs-on: openim + runs-on: ubuntu-latest env: REGISTRY: git.imall.cloud @@ -22,9 +22,33 @@ jobs: shell: sh run: | set -eu - if ! command -v git >/dev/null 2>&1; then - apk add --no-cache git openssh-client ca-certificates + if command -v git >/dev/null 2>&1; then + exit 0 fi + if command -v apt-get >/dev/null 2>&1; then + if command -v sudo >/dev/null 2>&1; then + sudo apt-get update -y + sudo apt-get install -y git openssh-client ca-certificates + else + apt-get update -y + apt-get install -y git openssh-client ca-certificates + fi + exit 0 + fi + if command -v apk >/dev/null 2>&1; then + apk add --no-cache git openssh-client ca-certificates + exit 0 + fi + if command -v yum >/dev/null 2>&1; then + if command -v sudo >/dev/null 2>&1; then + sudo yum install -y git openssh-clients ca-certificates + else + yum install -y git openssh-clients ca-certificates + fi + exit 0 + fi + echo "ERROR: no supported package manager found to install git." + exit 1 - name: Checkout shell: sh