OpenCue Post-Release Pipeline workflow (AcademySoftwareFoundation/OpenCue)
The OpenCue Post-Release Pipeline workflow from AcademySoftwareFoundation/OpenCue, 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 OpenCue Post-Release Pipeline workflow from the AcademySoftwareFoundation/OpenCue repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: OpenCue Post-Release Pipeline
# Workflow that runs after a new release is published.
on:
release:
types: [ published ]
jobs:
create_blog_post:
runs-on: ubuntu-22.04
name: Create Blog Post
steps:
- name: Trigger blog post workflow
env:
DOCS_REPO: AcademySoftwareFoundation/opencue.io
GITHUB_PAT: ${{ secrets.OPENCUE_AUTO_PAT }}
WORKFLOW_ID: 2618928
run: |
# Trigger the workflow in the opencue.io repository.
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: application/json" \
https://${GITHUB_PAT}@api.github.com/repos/${DOCS_REPO}/actions/workflows/${WORKFLOW_ID}/dispatches \
--data '{"ref": "master", "inputs": {"release_version": "${{ github.event.release.tag_name }}"}}'
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: OpenCue Post-Release Pipeline # Workflow that runs after a new release is published. on: release: types: [ published ] jobs: create_blog_post: timeout-minutes: 30 runs-on: latchkey-small name: Create Blog Post steps: - name: Trigger blog post workflow env: DOCS_REPO: AcademySoftwareFoundation/opencue.io GITHUB_PAT: ${{ secrets.OPENCUE_AUTO_PAT }} WORKFLOW_ID: 2618928 run: | # Trigger the workflow in the opencue.io repository. curl -X POST \ -H "Accept: application/vnd.github.v3+json" \ -H "Content-Type: application/json" \ https://${GITHUB_PAT}@api.github.com/repos/${DOCS_REPO}/actions/workflows/${WORKFLOW_ID}/dispatches \ --data '{"ref": "master", "inputs": {"release_version": "${{ github.event.release.tag_name }}"}}'
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.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Network fetches
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.