summaryrefslogtreecommitdiff
path: root/.github/workflows/beta-continue.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/beta-continue.yml')
-rw-r--r--.github/workflows/beta-continue.yml71
1 files changed, 71 insertions, 0 deletions
diff --git a/.github/workflows/beta-continue.yml b/.github/workflows/beta-continue.yml
new file mode 100644
index 00000000..5c1f2347
--- /dev/null
+++ b/.github/workflows/beta-continue.yml
@@ -0,0 +1,71 @@
+name: Scheduled Beta Continue
+
+on:
+ workflow_run:
+ workflows: ["CI", "Prepare Release Candidate", "Prepare Release Dependencies", "Promote Release Source"]
+ types: [completed]
+ branches: ["release/**", "develop"]
+
+permissions: {}
+
+jobs:
+ gate:
+ if: >-
+ github.event.workflow_run.actor.type == 'Bot' &&
+ (github.event.workflow_run.head_branch != 'develop' ||
+ github.event.workflow_run.path == '.github/workflows/prepare-release-dependencies.yml')
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ outputs:
+ enabled: ${{ steps.gate.outputs.enabled }}
+ steps:
+ - name: Require BETA_AUTOMATION=enabled
+ id: gate
+ env:
+ BETA_AUTOMATION: ${{ vars.BETA_AUTOMATION }}
+ RUN_URL: ${{ github.event.workflow_run.html_url }}
+ run: |
+ if [ "$BETA_AUTOMATION" = enabled ]; then
+ echo "enabled=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "Scheduled betas are paused: BETA_AUTOMATION is '${BETA_AUTOMATION:-<unset>}', not 'enabled'. Nothing was done after $RUN_URL." >> "$GITHUB_STEP_SUMMARY"
+ fi
+
+ continuation:
+ needs: gate
+ if: needs.gate.outputs.enabled == 'true'
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ environment: beta-automation
+ # Shared with the cut, so only one scheduler step acts at a time.
+ concurrency:
+ group: beta-scheduler
+ cancel-in-progress: false
+ permissions:
+ contents: read
+ issues: write
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
+ with:
+ persist-credentials: false
+ - name: Mint the release-bot token
+ id: app-token
+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
+ with:
+ # The token's JWT issuer may be the App ID or the client ID.
+ client-id: ${{ vars.RELEASE_BOT_APP_ID }}
+ private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
+ permission-actions: write
+ permission-contents: read
+ - name: Continue the beta
+ id: scheduler
+ env:
+ RELEASE_BOT_TOKEN: ${{ steps.app-token.outputs.token }}
+ RELEASE_BOT_SLUG: ${{ steps.app-token.outputs.app-slug }}
+ GITHUB_TOKEN: ${{ github.token }}
+ run: python3 .github/scripts/beta-scheduler.py continue
+ - name: Record an unreported failure
+ if: failure() && steps.scheduler.outputs.alerted != 'true'
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: python3 .github/scripts/beta-scheduler.py alert --stage continue --reason "The beta-continue job failed before the scheduler reported a result."