Skip to content

Commit 435dc35

Browse files
committed
chore(ci): add concurrency, timeouts, narrow fetch-depth, extend path filters
- Concurrency: PR runs cancel on new pushes (cheap signal refresh); main and release runs never cancel (preserve history, avoid partial releases). - Timeouts: every job has timeout-minutes so a stuck runner can't burn the 6h default (15m for prep/lint/check/tag, 20m for SDK jobs, 30m for the full goreleaser run). - fetch-depth: release_provider keeps :0 for goreleaser's changelog; release_python_sdk and tag_go_sdk drop it — neither reads history. - Path filters: include .github/workflows/pulumi-*.yml and .golangci.yml so workflow / lint config changes trigger CI.
1 parent d4adff3 commit 435dc35

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/pulumi-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
- "internal/**"
1111
- "go.mod"
1212
- "go.sum"
13+
- ".github/workflows/pulumi-*.yml"
14+
- ".golangci.yml"
1315
pull_request:
1416
branches:
1517
- main
@@ -18,6 +20,14 @@ on:
1820
- "internal/**"
1921
- "go.mod"
2022
- "go.sum"
23+
- ".github/workflows/pulumi-*.yml"
24+
- ".golangci.yml"
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
# Cancel in-progress PR runs on new pushes; let main runs finish to
29+
# preserve post-merge signal history.
30+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2131

2232
jobs:
2333
prerequisites:
@@ -29,6 +39,7 @@ jobs:
2939
# Depend on prerequisites so lint auto-skips on schema drift failures.
3040
needs: prerequisites
3141
runs-on: ubuntu-latest
42+
timeout-minutes: 15
3243
steps:
3344
- name: Checkout
3445
uses: actions/checkout@v4
@@ -51,6 +62,7 @@ jobs:
5162
name: GoReleaser Config Check
5263
needs: prerequisites
5364
runs-on: ubuntu-latest
65+
timeout-minutes: 15
5466
steps:
5567
- name: Checkout
5668
uses: actions/checkout@v4
@@ -66,6 +78,7 @@ jobs:
6678
name: Generate Python SDK
6779
needs: prerequisites
6880
runs-on: ubuntu-latest
81+
timeout-minutes: 20
6982
steps:
7083
- name: Checkout
7184
uses: actions/checkout@v4
@@ -104,6 +117,7 @@ jobs:
104117
name: Generate Go SDK
105118
needs: prerequisites
106119
runs-on: ubuntu-latest
120+
timeout-minutes: 20
107121
steps:
108122
- name: Checkout
109123
uses: actions/checkout@v4

.github/workflows/pulumi-release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ permissions:
1919
id-token: write
2020
attestations: write
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
# Never cancel a release mid-flight — a partial release leaves the GitHub
25+
# Release in an inconsistent state (binaries without signatures, tags
26+
# without wheels, etc.).
27+
cancel-in-progress: false
28+
2229
jobs:
2330
prerequisites:
2431
name: Prerequisites
@@ -28,10 +35,13 @@ jobs:
2835
name: Release Provider
2936
needs: prerequisites
3037
runs-on: ubuntu-latest
38+
timeout-minutes: 30
3139
steps:
3240
- name: Checkout
3341
uses: actions/checkout@v4
3442
with:
43+
# Full history required so goreleaser's github-native changelog
44+
# can walk commits since the previous tag.
3545
fetch-depth: 0
3646

3747
- name: Setup Go
@@ -92,11 +102,10 @@ jobs:
92102
# Depend on release_provider so the GitHub release exists before we upload the wheel.
93103
needs: release_provider
94104
runs-on: ubuntu-latest
105+
timeout-minutes: 15
95106
steps:
96107
- name: Checkout
97108
uses: actions/checkout@v4
98-
with:
99-
fetch-depth: 0
100109

101110
- name: Setup Go
102111
uses: actions/setup-go@v5
@@ -144,6 +153,7 @@ jobs:
144153
name: Tag Go SDK
145154
needs: release_provider
146155
runs-on: ubuntu-latest
156+
timeout-minutes: 15
147157
steps:
148158
- name: Checkout
149159
uses: actions/checkout@v4

0 commit comments

Comments
 (0)