mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-25 13:07:14 +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
8
.github/workflows/auto-tag.yml
vendored
8
.github/workflows/auto-tag.yml
vendored
@ -2,7 +2,7 @@ name: Auto Increment Version and Tag
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["CI - Build & Test"]
|
workflows: ["License Compliance (Feluda)"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
|
||||||
@ -55,9 +55,3 @@ jobs:
|
|||||||
|
|
||||||
git tag -a "$TAG" -m "Auto tag $TAG"
|
git tag -a "$TAG" -m "Auto tag $TAG"
|
||||||
git push "https://x-access-token:${PAT}@github.com/${{ github.repository }}.git" "$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
|
|
||||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -9,7 +9,7 @@ on:
|
|||||||
branches: [ main, master ]
|
branches: [ main, master ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
16
.github/workflows/license-compliance.yml
vendored
16
.github/workflows/license-compliance.yml
vendored
@ -1,20 +1,22 @@
|
|||||||
name: License Compliance (Feluda)
|
name: License Compliance (Feluda)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_run:
|
||||||
inputs:
|
workflows: ["CI - Build & Test"]
|
||||||
upload-artifacts:
|
types:
|
||||||
required: false
|
- completed
|
||||||
type: boolean
|
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compliance:
|
compliance:
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user