Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/spec-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,27 @@ jobs:
if: steps.regen.outcome == 'success'
continue-on-error: true
run: pytest tests/live -v
# The PR must not be opened with GITHUB_TOKEN. GitHub does not start
# workflow runs from GITHUB_TOKEN-raised events, so a PR opened that way
# never gets its required checks and can never be merged, however good
# the diff is. Both drift PRs sat blocked for days on exactly that.
#
# workflow_dispatch is documented as an exception to the no-runs rule and
# does start a run — but measured against a real PR, those check runs do
# not satisfy branch protection even on the right SHA under the right
# names. A push-event run does. So the push has to come from an identity
# that is not GITHUB_TOKEN, and this app is that identity.
- name: Mint an installation token for the drift bot
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.DRIFT_APP_ID }}
private-key: ${{ secrets.DRIFT_APP_PRIVATE_KEY }}

- name: Open PR if models changed
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.app-token.outputs.token }}
branch: bot/spec-drift
commit-message: "chore: regenerate models from upstream spec"
title: "Spec drift: regenerate models"
Expand Down