From 32dd3af8f4c555a0319ff4663a54e9d43b35179f Mon Sep 17 00:00:00 2001 From: Sean Tang <171081544+seant-aws@users.noreply.github.com> Date: Thu, 5 Nov 2026 18:55:54 +0000 Subject: [PATCH 1/5] ci: add the OpenJD release train workflow The caller of aws-deadline/.github's reusable release-train workflow, inert until the RELEASE_TRAIN_ENABLED variable is true. Dependabot no longer proposes openjd-* updates and the auto-approve job skips them: the release train owns those bumps. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com> --- .github/dependabot.yml | 4 ++ .github/workflows/auto_approve.yml | 2 + .github/workflows/release_train.yml | 60 +++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .github/workflows/release_train.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a5b4595..eb17c36 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,6 +12,10 @@ updates: day: "monday" commit-message: prefix: "chore(deps):" + ignore: + # The OpenJD release train bumps the openjd-* packages itself (release_train.yml), with its tests and + # release notes; a Dependabot PR for them would race it. + - dependency-name: "openjd-*" # Combine all minor and patch bumps into a single PR. Major bumps do not # match this group and so each get their own individual PR. groups: diff --git a/.github/workflows/auto_approve.yml b/.github/workflows/auto_approve.yml index b4838ce..1d0c33e 100644 --- a/.github/workflows/auto_approve.yml +++ b/.github/workflows/auto_approve.yml @@ -15,6 +15,8 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Approve a PR + # Never an openjd-* update: the release train owns those bumps (dependabot.yml ignores them). + if: ${{ !contains(steps.metadata.outputs.dependency-names, 'openjd-') }} run: gh pr review --approve "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/release_train.yml b/.github/workflows/release_train.yml new file mode 100644 index 0000000..d99b7e9 --- /dev/null +++ b/.github/workflows/release_train.yml @@ -0,0 +1,60 @@ +# The OpenJD release train for this repository. The train runs in AWS and holds no GitHub credential: this +# workflow asks it what to do (start a train for a new upstream release, push a bot/* branch, open its PR, +# notice a merge, dispatch Release: Bump) and does the GitHub writes with this job's GITHUB_TOKEN. All the logic +# and its checks live in the reusable workflow; this caller only sets the triggers and forwards the variables +# and secrets. +# +# Inert until an admin sets the variable RELEASE_TRAIN_ENABLED=true (the job is skipped otherwise). +# RELEASE_TRAIN_MODE names the train's mode, the secret RELEASE_TRAIN_ROLE the AWS role that may invoke the +# train's gateway. +# +# A PR the train opens has its CI held until a maintainer approves the run; review and squash-merge it as +# usual. The merge (a push to the default branch) runs this workflow, which tells the train. +# +# What runs it: a merge pushes, the repository's own "Release: Publish" completing, an upstream repository's +# run after its release (workflow_dispatch), and a person (workflow_dispatch). A run that started or advanced +# a train waits for the train's next step. The daily schedule is the backstop for an event that went missing. +name: Release train + +on: + schedule: + # Daily backstop, off the hour. + - cron: "17 6 * * *" + workflow_dispatch: + push: + # The default branch: a merged bot PR is reported right away instead of on the next schedule. + branches: [mainline] + # A release: the train sees it without waiting for the schedule. The run is only a signal: it runs this file + # from the default branch with the default branch's OIDC subject, and the reusable workflow reads nothing of + # the run that triggered it (no artifact, head ref or event payload). + workflow_run: # zizmor: ignore[dangerous-triggers] + workflows: ["Release: Publish"] + types: [completed] + +# One run at a time per repository; a run that finds nothing to do takes a few seconds. +concurrency: + group: release-train + cancel-in-progress: false + +permissions: {} + +jobs: + train: + if: ${{ vars.RELEASE_TRAIN_ENABLED == 'true' }} + # Our own reusable workflow, referenced by branch like every aws-deadline/.github workflow (the + # aws-deadline zizmor policy allows that ref pin for aws-deadline/*). + uses: aws-deadline/.github/.github/workflows/reusable_release_train.yml@mainline + permissions: + contents: write # push bot/* branches; create tags and releases (rehearsal only) + pull-requests: write # open and update the train's PRs and their labels + actions: write # dispatch this repository's own Release: Bump (live mode) + id-token: write # OIDC tokens for the AWS role and the gateway + with: + mode: ${{ vars.RELEASE_TRAIN_MODE }} + # The repositories this one may start after a release (also on the train's own allowlist). + dispatch_repos: "aws-deadline/deadline-cloud-worker-agent" + secrets: + role_arn: ${{ secrets.RELEASE_TRAIN_ROLE }} + # The release workflows' token, used only by the dispatch step to run release_train.yml in + # dispatch_repos. Optional: without it those repositories' daily run picks a release up. + dispatch_token: ${{ secrets.CI_TOKEN }} From 562046352a02cd59b561439877500bba496c1d07 Mon Sep 17 00:00:00 2001 From: Sean Tang <171081544+seant-aws@users.noreply.github.com> Date: Thu, 5 Nov 2026 20:45:01 +0000 Subject: [PATCH 2/5] ci: dispatch downstream release trains with one bot-owned token per organization Pass RELEASE_TRAIN_DISPATCH_TOKEN (OpenJobDescription repositories) and RELEASE_TRAIN_DISPATCH_TOKEN_AWS_DEADLINE (aws-deadline repositories) to the reusable workflow's per-organization dispatch secrets, in place of the release workflows' token. Both are optional; without one, that organization's downstream repositories pick a release up on their daily run. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com> --- .github/workflows/release_train.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_train.yml b/.github/workflows/release_train.yml index d99b7e9..56b7d4b 100644 --- a/.github/workflows/release_train.yml +++ b/.github/workflows/release_train.yml @@ -55,6 +55,8 @@ jobs: dispatch_repos: "aws-deadline/deadline-cloud-worker-agent" secrets: role_arn: ${{ secrets.RELEASE_TRAIN_ROLE }} - # The release workflows' token, used only by the dispatch step to run release_train.yml in - # dispatch_repos. Optional: without it those repositories' daily run picks a release up. - dispatch_token: ${{ secrets.CI_TOKEN }} + # Bot-owned, Actions-only dispatch tokens, one per organization, used only by the dispatch step to run + # release_train.yml in dispatch_repos. Optional: without an organization's token its repositories pick a + # release up on their daily run. + dispatch_token_openjd: ${{ secrets.RELEASE_TRAIN_DISPATCH_TOKEN }} + dispatch_token_aws_deadline: ${{ secrets.RELEASE_TRAIN_DISPATCH_TOKEN_AWS_DEADLINE }} From 43facb427baa18c47f773e6aa0d25ce8db069d17 Mon Sep 17 00:00:00 2001 From: Sean Tang <171081544+seant-aws@users.noreply.github.com> Date: Mon, 9 Nov 2026 23:35:56 +0000 Subject: [PATCH 3/5] feat: add a Monday check for a weekly release Runs the release train every Monday next to its daily backstop, for the train's planned weekly release check. It does nothing until the release train's weekly mode is enabled; the repository variable RELEASE_TRAIN_WEEKLY=false pauses it. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com> --- .github/workflows/release_train.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release_train.yml b/.github/workflows/release_train.yml index 56b7d4b..b53b744 100644 --- a/.github/workflows/release_train.yml +++ b/.github/workflows/release_train.yml @@ -20,6 +20,8 @@ on: schedule: # Daily backstop, off the hour. - cron: "17 6 * * *" + # Monday check for a weekly release; the train decides. Pause with the repo variable RELEASE_TRAIN_WEEKLY=false. + - cron: "17 15 * * 1" workflow_dispatch: push: # The default branch: a merged bot PR is reported right away instead of on the next schedule. From c726215b629b528ae41dbdf57474cdbd320deae7 Mon Sep 17 00:00:00 2001 From: Sean Tang <171081544+seant-aws@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:14:14 +0000 Subject: [PATCH 4/5] docs(release-train): correct what the train does in the caller comments The Dependabot comment said the train writes release notes, and the contents: write comment said it creates tags and releases. The train opens PRs that people review and merge; release notes come from this repository's own generator, and Release: Publish tags and releases (the train makes a prerelease tag only in rehearsal mode). The workflow_run comment now says what the reusable workflow reads of the triggering run and that it goes on only for a successful Publish of the release branch. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com> --- .github/dependabot.yml | 4 ++-- .github/workflows/release_train.yml | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index eb17c36..1cfa3dd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,8 +13,8 @@ updates: commit-message: prefix: "chore(deps):" ignore: - # The OpenJD release train bumps the openjd-* packages itself (release_train.yml), with its tests and - # release notes; a Dependabot PR for them would race it. + # The OpenJD release train bumps the openjd-* packages itself (release_train.yml) in PRs that people + # review and merge; a Dependabot PR for them would race it. - dependency-name: "openjd-*" # Combine all minor and patch bumps into a single PR. Major bumps do not # match this group and so each get their own individual PR. diff --git a/.github/workflows/release_train.yml b/.github/workflows/release_train.yml index b53b744..e5289f2 100644 --- a/.github/workflows/release_train.yml +++ b/.github/workflows/release_train.yml @@ -27,8 +27,9 @@ on: # The default branch: a merged bot PR is reported right away instead of on the next schedule. branches: [mainline] # A release: the train sees it without waiting for the schedule. The run is only a signal: it runs this file - # from the default branch with the default branch's OIDC subject, and the reusable workflow reads nothing of - # the run that triggered it (no artifact, head ref or event payload). + # from the default branch with the default branch's OIDC subject. The reusable workflow reads only the + # triggering run's conclusion, head repository, head branch and URL, and goes on only for a successful + # Publish of this repository's own release branch. workflow_run: # zizmor: ignore[dangerous-triggers] workflows: ["Release: Publish"] types: [completed] @@ -47,7 +48,7 @@ jobs: # aws-deadline zizmor policy allows that ref pin for aws-deadline/*). uses: aws-deadline/.github/.github/workflows/reusable_release_train.yml@mainline permissions: - contents: write # push bot/* branches; create tags and releases (rehearsal only) + contents: write # push bot/* branches; a prerelease tag in rehearsal mode only pull-requests: write # open and update the train's PRs and their labels actions: write # dispatch this repository's own Release: Bump (live mode) id-token: write # OIDC tokens for the AWS role and the gateway From 812cb1c6e8f34cdffd6376285e14b290b0b9f6cb Mon Sep 17 00:00:00 2001 From: Sean Tang <171081544+seant-aws@users.noreply.github.com> Date: Tue, 17 Nov 2026 22:32:41 +0000 Subject: [PATCH 5/5] ci: say the release train runs only in live mode The reusable workflow no longer has a rehearsal mode or creates tags, so the permission comments and the mode note now say what the train does: push bot/* branches, dispatch Release: Bump, and run only with RELEASE_TRAIN_MODE=live. Signed-off-by: Sean Tang <171081544+seant-aws@users.noreply.github.com> --- .github/workflows/release_train.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release_train.yml b/.github/workflows/release_train.yml index e5289f2..d6f1d64 100644 --- a/.github/workflows/release_train.yml +++ b/.github/workflows/release_train.yml @@ -5,8 +5,8 @@ # and secrets. # # Inert until an admin sets the variable RELEASE_TRAIN_ENABLED=true (the job is skipped otherwise). -# RELEASE_TRAIN_MODE names the train's mode, the secret RELEASE_TRAIN_ROLE the AWS role that may invoke the -# train's gateway. +# RELEASE_TRAIN_MODE must be live (any other value fails the run); the secret RELEASE_TRAIN_ROLE names the AWS +# role that may invoke the train's gateway. # # A PR the train opens has its CI held until a maintainer approves the run; review and squash-merge it as # usual. The merge (a push to the default branch) runs this workflow, which tells the train. @@ -48,9 +48,9 @@ jobs: # aws-deadline zizmor policy allows that ref pin for aws-deadline/*). uses: aws-deadline/.github/.github/workflows/reusable_release_train.yml@mainline permissions: - contents: write # push bot/* branches; a prerelease tag in rehearsal mode only + contents: write # push bot/* branches pull-requests: write # open and update the train's PRs and their labels - actions: write # dispatch this repository's own Release: Bump (live mode) + actions: write # dispatch this repository's own Release: Bump id-token: write # OIDC tokens for the AWS role and the gateway with: mode: ${{ vars.RELEASE_TRAIN_MODE }}