add workflow permissions and concurrency

This commit is contained in:
xopenwrt 2026-06-29 21:57:48 +08:00
parent cde11ef052
commit e79a0414be
4 changed files with 39 additions and 0 deletions

View File

@ -38,6 +38,14 @@ on:
#watch:
# types: [started]
permissions:
contents: write
actions: write
concurrency:
group: openwrt-release-${{ github.ref }}
cancel-in-progress: false
### 环境变量设置
env:
# 编译时调用的 [.config] 文件名称

View File

@ -38,6 +38,14 @@ on:
#watch:
# types: [started]
permissions:
contents: write
actions: write
concurrency:
group: openwrt-release-${{ github.ref }}
cancel-in-progress: false
### 环境变量设置
env:
# 编译时调用的 [.config] 文件名称

View File

@ -38,6 +38,14 @@ on:
#watch:
# types: [started]
permissions:
contents: write
actions: write
concurrency:
group: openwrt-release-${{ github.ref }}
cancel-in-progress: false
### 环境变量设置
env:
# 编译时调用的 [.config] 文件名称

View File

@ -0,0 +1,15 @@
# AI Modification Log: Workflow Permissions And Concurrency
Date: 2026-06-29
## Change
- Added explicit workflow permissions to X/Y/Z workflows:
- `contents: write`
- `actions: write`
- Added workflow-level concurrency grouped by `openwrt-release-${{ github.ref }}`.
- Set `cancel-in-progress: false` so existing long-running builds are not cancelled automatically.
## Reason
Release uploads need content write permission, and workflow-run cleanup needs actions write permission. Concurrency prevents multiple runs of the same workflow/ref from racing on shared release tags and dated upload paths.