After Release workflow (gofiber/fiber)
The After Release workflow from gofiber/fiber, explained and optimized by Latchkey.
CI health: B - good
Point runs-on at Latchkey and get job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the After Release workflow from the gofiber/fiber repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: After Release
on:
release:
types: [published]
repository_dispatch:
types: [after-release]
workflow_dispatch:
permissions:
contents: read
jobs:
parse-tag:
if: github.event_name == 'release'
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
major: ${{ steps.parse.outputs.major }}
steps:
- name: Extract major version from tag
id: parse
run: echo "major=${TAG%%.*}" >> "$GITHUB_OUTPUT"
env:
TAG: ${{ github.event.release.tag_name }}
move-milestone:
needs: parse-tag
if: github.event_name == 'release'
permissions:
contents: read
issues: write
pull-requests: write
uses: ./.github/workflows/move-closed-milestone-items.yml
with:
source_milestone: ${{ needs.parse-tag.outputs.major }}
target_milestone: ${{ github.event.release.tag_name }}
secrets:
ISSUE_PR_TOKEN: ${{ secrets.ISSUE_PR_TOKEN }}
notify:
uses: gofiber/.github/.github/workflows/after-release.yml@main
with:
skip-wait: ${{ github.event_name == 'workflow_dispatch' }}
repos: |
- gofiber/contrib
- gofiber/storage
- gofiber/template
- gofiber/cli
- gofiber/boilerplate
- gofiber/recipes
secrets:
dispatch-token: ${{ secrets.DISPATCH_TOKEN }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: After Release on: release: types: [published] repository_dispatch: types: [after-release] workflow_dispatch: permissions: contents: read jobs: parse-tag: if: github.event_name == 'release' runs-on: latchkey-small timeout-minutes: 30 outputs: major: ${{ steps.parse.outputs.major }} steps: - name: Extract major version from tag id: parse run: echo "major=${TAG%%.*}" >> "$GITHUB_OUTPUT" env: TAG: ${{ github.event.release.tag_name }} move-milestone: timeout-minutes: 30 needs: parse-tag if: github.event_name == 'release' permissions: contents: read issues: write pull-requests: write uses: ./.github/workflows/move-closed-milestone-items.yml with: source_milestone: ${{ needs.parse-tag.outputs.major }} target_milestone: ${{ github.event.release.tag_name }} secrets: ISSUE_PR_TOKEN: ${{ secrets.ISSUE_PR_TOKEN }} notify: timeout-minutes: 30 uses: gofiber/.github/.github/workflows/after-release.yml@main with: skip-wait: ${{ github.event_name == 'workflow_dispatch' }} repos: | - gofiber/contrib - gofiber/storage - gofiber/template - gofiber/cli - gofiber/boilerplate - gofiber/recipes secrets: dispatch-token: ${{ secrets.DISPATCH_TOKEN }}
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.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
This workflow runs 3 jobs per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.