Merge pull request #2740 from Steve-xmh/auto-submit-issue-2739 #712
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |