feat: 生成最后更新时间字段,支持增量更新
This commit is contained in:
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -10,6 +10,14 @@ on:
|
||||
- 'repo/**'
|
||||
- 'build/build.js'
|
||||
- '.github/workflows/**'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force_update:
|
||||
description: '强制执行全量更新'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# Skip this job if the repository is a fork
|
||||
@@ -33,7 +41,15 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: node ./build/build.js
|
||||
- name: Build repo.json
|
||||
run: |
|
||||
if [ "${{ github.event.inputs.force_update }}" = "true" ]; then
|
||||
echo "执行强制全量更新"
|
||||
node ./build/build.js --force
|
||||
else
|
||||
echo "执行增量更新"
|
||||
node ./build/build.js
|
||||
fi
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: update repo.json
|
||||
@@ -63,4 +79,4 @@ jobs:
|
||||
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
r2-bucket: ${{ secrets.R2_BUCKET }}
|
||||
source-dir: my_files/
|
||||
destination-dir: github_mirror/
|
||||
destination-dir: github_mirror/
|
||||
Reference in New Issue
Block a user