-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (43 loc) · 1.28 KB
/
rebuild-folder.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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