Skip to content

Commit e836a2d

Browse files
committed
add concurrency for PRs
1 parent 838d0f9 commit e836a2d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ on:
1616
- 'LICENSE'
1717
- 'README.md'
1818

19+
concurrency:
20+
# PRs share a group (PR number) → newer PR runs cancel older ones.
21+
# Push/dispatch runs use unique run_id → nothing gets cancelled.
22+
group: build-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}
23+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
24+
1925
env:
2026
UV_PYTHON: 3.12
2127
PYTHONUTF8: 1
@@ -246,11 +252,14 @@ jobs:
246252
dependabot:
247253
name: 'Dependabot'
248254
# needs: [build-aab, build-apk, build-ipa, build-linux, build-macos, build-web, build-windows]
249-
needs: [build-web]
255+
#needs: []
250256
runs-on: ubuntu-latest
251257
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
258+
permissions:
259+
contents: read
260+
pull-requests: write
252261
steps:
253-
- name: Enable auto-merge for Dependabot PRs
262+
- name: Merge Dependabot PR
254263
env:
255264
PR_URL: ${{github.event.pull_request.html_url}}
256265
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)