chore(workflow): 更新工作流配置以优化许可证合规检查

- 修改 auto-tag 工作流触发器从 "CI - Build & Test" 到 "License Compliance (Feluda)"
- 移除 license-compliance 工作流中的依赖和权限设置
- 将 license-compliance 工作流的触发方式改为 workflow_run
- 调整 ci 工作流中的内容权限从 write 改为 read
- 在 license-compliance 工作流中添加分支和提交消息条件检查
This commit is contained in:
GeWuYou 2026-02-02 22:35:15 +08:00
parent dadda8803f
commit 3571ba8ced
3 changed files with 12 additions and 16 deletions

View File

@ -2,7 +2,7 @@ name: Auto Increment Version and Tag
on:
workflow_run:
workflows: ["CI - Build & Test"]
workflows: ["License Compliance (Feluda)"]
types:
- completed
@ -55,9 +55,3 @@ jobs:
git tag -a "$TAG" -m "Auto tag $TAG"
git push "https://x-access-token:${PAT}@github.com/${{ github.repository }}.git" "$TAG"
license-compliance:
needs: auto-tag
if: needs.auto-tag.outputs.tagged == 'true'
uses: ./.github/workflows/license-compliance.yml
permissions:
contents: read

View File

@ -9,7 +9,7 @@ on:
branches: [ main, master ]
permissions:
contents: write
contents: read
security-events: write
jobs:

View File

@ -1,20 +1,22 @@
name: License Compliance (Feluda)
on:
workflow_call:
inputs:
upload-artifacts:
required: false
type: boolean
workflow_run:
workflows: ["CI - Build & Test"]
types:
- completed
default: true
permissions:
contents: read
contents: write
jobs:
compliance:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'&&
contains(github.event.workflow_run.head_commit.message, '[release ci]')
steps:
- name: Checkout repository
uses: actions/checkout@v4