Check Firefox Candidate Release workflow (zen-browser/desktop)
The Check Firefox Candidate Release workflow from zen-browser/desktop, explained and optimized by Latchkey.
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Check Firefox Candidate Release workflow from the zen-browser/desktop repository, a real project running GitHub Actions. It is shown here with attribution under its MPL-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Check Firefox Candidate Release
on:
schedule:
- cron: "59 4 * * 2"
workflow_dispatch:
permissions:
contents: read
jobs:
check_candidates:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Check for any updates
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
DISCORD_PING_IDS: ${{ secrets.DISCORD_PING_IDS }}
run: |
python3 scripts/check_rc_response.py
sync-upstream:
name: Sync Upstream
uses: ./.github/workflows/sync-upstream.yml
permissions:
contents: write
secrets: inherit
needs: [check_candidates]
with:
release_candidate: true
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Check Firefox Candidate Release on: schedule: - cron: "59 4 * * 2" workflow_dispatch: permissions: contents: read jobs: check_candidates: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Check out repository uses: actions/checkout@v3 - name: Check for any updates env: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} DISCORD_PING_IDS: ${{ secrets.DISCORD_PING_IDS }} run: | python3 scripts/check_rc_response.py sync-upstream: timeout-minutes: 30 name: Sync Upstream uses: ./.github/workflows/sync-upstream.yml permissions: contents: write secrets: inherit needs: [check_candidates] with: release_candidate: true
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 2 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.