mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
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:
parent
dadda8803f
commit
3571ba8ced
10
.github/workflows/auto-tag.yml
vendored
10
.github/workflows/auto-tag.yml
vendored
@ -2,7 +2,7 @@ name: Auto Increment Version and Tag
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["CI - Build & Test"]
|
||||
workflows: ["License Compliance (Feluda)"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
@ -54,10 +54,4 @@ jobs:
|
||||
fi
|
||||
|
||||
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
|
||||
git push "https://x-access-token:${PAT}@github.com/${{ github.repository }}.git" "$TAG"
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -9,7 +9,7 @@ on:
|
||||
branches: [ main, master ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
|
||||
16
.github/workflows/license-compliance.yml
vendored
16
.github/workflows/license-compliance.yml
vendored
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user