Skip to content

Commit 5b21a08

Browse files
authored
Merge pull request #7 from runloopai/ci/stlc-promote-on-codegen
ci(stlc): promote as soon as an stlc build lands on main
2 parents a3b50f5 + a96b701 commit 5b21a08

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

‎.github/workflows/stlc-promote.yml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ name: Promote SDKs
33
# Promote staging to production by fast-forwarding production main up to staging,
44
# preserving SHAs so the trunks stay identical and linear (nothing to heal on the
55
# next stlc build). This is a git-only reconciliation, not a release: release-please
6-
# owns the actual version bump/publish gate on production. Runs daily so unpromoted
7-
# staging content can't sit long enough to fork against an independent production
8-
# push; workflow_dispatch remains for an eager promote. The fast-forward-only guard
9-
# below makes every run a safe no-op when there's nothing to promote.
6+
# owns the actual version bump/publish gate on production. Runs as soon as an stlc
7+
# build lands on staging main, because any production merge before the promote forks
8+
# the trunks and blocks both directions; the daily schedule is a backstop and
9+
# workflow_dispatch an eager promote. The fast-forward-only guard below makes every
10+
# run a safe no-op when there's nothing to promote.
1011
on:
12+
push:
13+
branches: [main]
1114
schedule:
1215
# 8am PT (15:00 UTC); shifts to 7am during PST since GitHub cron doesn't track DST.
1316
- cron: '0 15 * * *'
@@ -20,7 +23,11 @@ jobs:
2023
promote:
2124
# Runner comes from the STLC_RUNNER repo/org variable when set; defaults to GitHub-hosted.
2225
runs-on: ${{ vars.STLC_RUNNER || 'ubuntu-latest' }}
23-
if: github.repository == 'runloopai/api-client-python-staging'
26+
# push: stlc builds only (Stainless-Generated-From trailer); other staging pushes
27+
# wait for the schedule.
28+
if: >-
29+
github.repository == 'runloopai/api-client-python-staging' &&
30+
(github.event_name != 'push' || contains(github.event.head_commit.message, 'Stainless-Generated-From'))
2431
# Optional gate: add required reviewers to this environment to approve each
2532
# promote. With none it only scopes secrets and adds no gate. Remove if unused.
2633
environment: production

0 commit comments

Comments
 (0)