ci: 更新 workflows 中使用的 action,避免 node 版本低于 24 的 warning (#689)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2026-03-25 16:50:47 +08:00
committed by GitHub
parent 47ce8f148b
commit 72bf2b6a4d
4 changed files with 20 additions and 21 deletions

View File

@@ -12,7 +12,7 @@ jobs:
working-directory: web working-directory: web
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Setup bun - name: Setup bun
uses: oven-sh/setup-bun@v2 uses: oven-sh/setup-bun@v2
with: with:
@@ -20,7 +20,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: bun install --frozen-lockfile
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.bun/install/cache path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }} key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
@@ -29,7 +29,7 @@ jobs:
- name: Build Frontend - name: Build Frontend
run: bun run build run: bun run build
- name: Upload Web Build Artifact - name: Upload Web Build Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v6
with: with:
name: web-build name: web-build
path: web/build path: web/build
@@ -72,20 +72,19 @@ jobs:
name: bili-sync-rs-Windows-x86_64.zip name: bili-sync-rs-Windows-x86_64.zip
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Download Web Build Artifact - name: Download Web Build Artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v8
with: with:
name: web-build name: web-build
path: web/build path: web/build
- name: Read Toolchain Version - name: Read Toolchain Version
uses: SebRollen/toml-action@v1.2.0
id: read_rust_toolchain id: read_rust_toolchain
with: run: |
file: rust-toolchain.toml channel=$(grep '^channel' rust-toolchain.toml | sed 's/.*= *"\(.*\)"/\1/')
field: toolchain.channel echo "value=$channel" >> $GITHUB_OUTPUT
- name: Build binary - name: Build binary
uses: houseabsolute/actions-rust-cross@v1 uses: houseabsolute/actions-rust-cross@v1
with: with:
@@ -104,7 +103,7 @@ jobs:
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }} tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi fi
- name: Upload release artifact - name: Upload release artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v6
with: with:
name: bili-sync-rs-${{ matrix.platform.release_for }} name: bili-sync-rs-${{ matrix.platform.release_for }}
path: | path: |

View File

@@ -5,7 +5,7 @@ on:
branches: branches:
- main - main
paths: paths:
- 'docs/**' - "docs/**"
jobs: jobs:
doc: doc:
@@ -16,7 +16,7 @@ jobs:
working-directory: docs working-directory: docs
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Setup bun - name: Setup bun
uses: oven-sh/setup-bun@v2 uses: oven-sh/setup-bun@v2
with: with:
@@ -24,7 +24,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: bun install --frozen-lockfile
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.bun/install/cache path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }} key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}
@@ -38,4 +38,4 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist publish_dir: docs/.vitepress/dist
force_orphan: true force_orphan: true
commit_message: 部署来自 main 的最新文档变更: commit_message: 部署来自 main 的最新文档变更:

View File

@@ -24,7 +24,7 @@ jobs:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
- run: rustup install && rustup component add rustfmt --toolchain nightly - run: rustup install && rustup component add rustfmt --toolchain nightly
@@ -50,7 +50,7 @@ jobs:
working-directory: web working-directory: web
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Setup bun - name: Setup bun
uses: oven-sh/setup-bun@v2 uses: oven-sh/setup-bun@v2
with: with:
@@ -58,7 +58,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: bun install --frozen-lockfile
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.bun/install/cache path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }} key: ${{ runner.os }}-bun-${{ hashFiles('docs/bun.lockb') }}

View File

@@ -16,9 +16,9 @@ jobs:
contents: write contents: write
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Download release artifact - name: Download release artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v8
with: with:
merge-multiple: true merge-multiple: true
- name: Publish GitHub release - name: Publish GitHub release
@@ -35,9 +35,9 @@ jobs:
contents: write contents: write
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Download release artifact - name: Download release artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@v8
with: with:
merge-multiple: true merge-multiple: true
- name: Docker Meta - name: Docker Meta