ci: 限制触发分支 + 并发取消 + 超时兜底,减少 Actions 分钟消耗
This commit is contained in:
1 parent
4ab12be15d
commit
577a891e73
1 file changed
+12
-1
@@ -1,10 +1,21 @@
|
||||
name: validate
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
# 连推多次时只保留最后一次,避免排队任务白烧分钟
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
|
||||
Reference in new issue
Block a user