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