调整工作流环境,移除 Git 和 Docker 安装步骤
Build Push and Deploy / docker-image (push) Failing after 15s
Build Push and Deploy / deploy-fallback-log (push) Successful in 1s

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-24 15:06:55 +08:00
parent 05868c6af6
commit baa5d41bec
+2 -46
View File
@@ -7,7 +7,7 @@ on:
jobs:
docker-image:
runs-on: node
runs-on: ubuntu
permissions:
contents: read
defaults:
@@ -15,55 +15,11 @@ jobs:
shell: sh
steps:
- name: Ensure Git is available
run: |
if command -v git >/dev/null 2>&1; then
git --version
exit 0
fi
if command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y git
elif command -v apk >/dev/null 2>&1; then
apk add --no-cache git
elif command -v dnf >/dev/null 2>&1; then
dnf install -y git
elif command -v yum >/dev/null 2>&1; then
yum install -y git
else
echo "No supported package manager found to install git"
exit 1
fi
git --version
- name: Checkout code
uses: actions/checkout@v4
with:
github-server-url: ${{ github.server_url }}
- name: Ensure Docker CLI is available
run: |
if command -v docker >/dev/null 2>&1; then
docker --version
exit 0
fi
if command -v apt-get >/dev/null 2>&1; then
apt-get update && apt-get install -y docker.io
elif command -v apk >/dev/null 2>&1; then
apk add --no-cache docker-cli
elif command -v dnf >/dev/null 2>&1; then
dnf install -y docker
elif command -v yum >/dev/null 2>&1; then
yum install -y docker
else
echo "No supported package manager found to install docker"
exit 1
fi
docker --version
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -105,7 +61,7 @@ jobs:
-d "{\"image\":\"${IMAGE}\",\"tag\":\"${{ github.ref_name }}\",\"repo\":\"${{ github.repository }}\"}"
deploy-fallback-log:
runs-on: node
runs-on: ubuntu
needs: docker-image
if: failure()
steps: