修复 Runner 构建:改用 apt 安装 JDK 和 Node.js,避免从 GitHub 下载超时
This commit is contained in:
@@ -30,15 +30,16 @@ jobs:
|
|||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Setup JDK 21
|
- name: Setup JDK 21
|
||||||
uses: actions/setup-java@v4
|
run: |
|
||||||
with:
|
sudo apt-get update -qq
|
||||||
java-version: '21'
|
sudo apt-get install -y openjdk-21-jdk
|
||||||
distribution: 'temurin'
|
java -version
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js 22
|
||||||
uses: actions/setup-node@v6
|
run: |
|
||||||
with:
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
||||||
node-version: 22
|
sudo apt-get install -y nodejs
|
||||||
|
node --version
|
||||||
|
|
||||||
# 动态生成中文版 capacitor.config.json(webDir 指向 zh/ 目录)
|
# 动态生成中文版 capacitor.config.json(webDir 指向 zh/ 目录)
|
||||||
- name: Create capacitor.config.json (zh)
|
- name: Create capacitor.config.json (zh)
|
||||||
@@ -99,15 +100,16 @@ jobs:
|
|||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Setup JDK 21
|
- name: Setup JDK 21
|
||||||
uses: actions/setup-java@v4
|
run: |
|
||||||
with:
|
sudo apt-get update -qq
|
||||||
java-version: '21'
|
sudo apt-get install -y openjdk-21-jdk
|
||||||
distribution: 'temurin'
|
java -version
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js 22
|
||||||
uses: actions/setup-node@v6
|
run: |
|
||||||
with:
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
|
||||||
node-version: 22
|
sudo apt-get install -y nodejs
|
||||||
|
node --version
|
||||||
|
|
||||||
# 动态生成英文版 capacitor.config.json(webDir 指向 en/ 目录)
|
# 动态生成英文版 capacitor.config.json(webDir 指向 en/ 目录)
|
||||||
- name: Create capacitor.config.json (en)
|
- name: Create capacitor.config.json (en)
|
||||||
|
|||||||
Reference in New Issue
Block a user