feat: add concurrency settings and branch ignore for pull request workflows

This commit is contained in:
Jeffery
2026-05-12 18:17:14 +08:00
parent ea64c5f063
commit d95213334b
+30 -1
View File
@@ -32,8 +32,13 @@
### 1. OpenAI ### 1. OpenAI
```yaml ```yaml
name: AI name: AI
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches-ignore:
- master
types: [opened, synchronize] types: [opened, synchronize]
jobs: jobs:
code-review: code-review:
@@ -55,8 +60,13 @@ jobs:
### 2. OpenRouter ### 2. OpenRouter
```yaml ```yaml
name: AI name: AI
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches-ignore:
- master
types: [opened, synchronize] types: [opened, synchronize]
jobs: jobs:
code-review: code-review:
@@ -78,8 +88,13 @@ jobs:
### 3. Anthropic Claude ### 3. Anthropic Claude
```yaml ```yaml
name: AI name: AI
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches-ignore:
- master
types: [opened, synchronize] types: [opened, synchronize]
jobs: jobs:
code-review: code-review:
@@ -100,8 +115,13 @@ jobs:
### 4. Google Gemini ### 4. Google Gemini
```yaml ```yaml
name: AI name: AI
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches-ignore:
- master
types: [opened, synchronize] types: [opened, synchronize]
jobs: jobs:
code-review: code-review:
@@ -123,8 +143,13 @@ jobs:
### 5. Amazon Q ### 5. Amazon Q
```yaml ```yaml
name: AI name: AI
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches-ignore:
- master
types: [opened, synchronize] types: [opened, synchronize]
jobs: jobs:
code-review: code-review:
@@ -146,8 +171,13 @@ jobs:
```yaml ```yaml
name: AI name: AI
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on: on:
pull_request: pull_request:
branches-ignore:
- master
types: [opened, synchronize] types: [opened, synchronize]
jobs: jobs:
code-review: code-review:
@@ -162,6 +192,5 @@ jobs:
permissions: permissions:
contents: write contents: write
pull-requests: write pull-requests: write
issues: write issues: write
``` ```