fix: 使用 Alpine 容器镜像解决 checkout action 找不到 node 的问题

This commit is contained in:
hhs
2026-06-13 11:38:48 +08:00
parent 17c8ced6bd
commit c5c9bf802f
3 changed files with 6 additions and 0 deletions

View File

@@ -9,10 +9,14 @@ on:
jobs: jobs:
ci: ci:
runs-on: aliyun runs-on: aliyun
container: golang:1.23-alpine
defaults: defaults:
run: run:
working-directory: backend working-directory: backend
steps: steps:
- name: Install Node.js (for checkout action)
run: apk add --no-cache nodejs
- uses: "http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4" - uses: "http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4"
- name: Download dependencies - name: Download dependencies

View File

@@ -9,6 +9,7 @@ on:
jobs: jobs:
ci: ci:
runs-on: aliyun runs-on: aliyun
container: node:22-alpine
defaults: defaults:
run: run:
working-directory: frontend working-directory: frontend

View File

@@ -6,6 +6,7 @@ on: [push]
jobs: jobs:
health: health:
runs-on: aliyun runs-on: aliyun
container: node:22-alpine
steps: steps:
- run: echo "🎉 Triggered by ${{ gitea.event_name }} event" - run: echo "🎉 Triggered by ${{ gitea.event_name }} event"
- run: echo "🌿 Branch: ${{ gitea.ref }}, Repo: ${{ gitea.repository }}" - run: echo "🌿 Branch: ${{ gitea.ref }}, Repo: ${{ gitea.repository }}"