Skip to content

Merge pull request #2513 from Steve-xmh/auto-submit-issue-2512 #638

Merge pull request #2513 from Steve-xmh/auto-submit-issue-2512

Merge pull request #2513 from Steve-xmh/auto-submit-issue-2512 #638

name: 重建歌词文件夹
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'scripts/**'
- 'raw-lyrics/**'
concurrency:
group: check-submit
cancel-in-progress: true
jobs:
check-submit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 签出代码
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 缓存依赖
uses: actions/cache@v2
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: 缓存构建产物
uses: actions/cache@v2
with:
path: scripts/rebuild-folder/target
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
- name: 运行重建程序
timeout-minutes: 10
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@users.noreply.github.com'
cargo run --release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: scripts/rebuild-folder