Skip to content
Latchkey

Build autobuild container that runs tests on dashboard.sitespeed.io workflow (sitespeedio/sitespeed.io)

The Build autobuild container that runs tests on dashboard.sitespeed.io workflow from sitespeedio/sitespeed.io, explained and optimized by Latchkey.

C

CI health: C - fair

Point runs-on at Latchkey and get run de-duplication, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: sitespeedio/sitespeed.io.github/workflows/building-docker-autobuild.ymlLicense MITView source

What it does

This is the Build autobuild container that runs tests on dashboard.sitespeed.io workflow from the sitespeedio/sitespeed.io 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

workflow (.yml)
name: Build autobuild container that runs tests on dashboard.sitespeed.io
on:
  push:
    branches:
    - main
  # release.yml dispatches this workflow after the "new version" commit lands,
  # because that commit is pushed with GITHUB_TOKEN and so doesn't trigger
  # push-based workflows on its own.
  workflow_dispatch:
jobs:
  docker:
    runs-on: ubuntu-24.04
    # On workflow_dispatch the head_commit object is null, so the docs: skip
    # heuristic only applies to real pushes.
    if: ${{ github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message, 'docs:') }}
    steps:
      -
        name: Harden Runner
        uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
        with:
          egress-policy: audit
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
      -
        name: Login to DockerHub
        uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build and push sitespeed.io
        uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
        with:
          platforms: linux/amd64
          push: true
          provenance: false
          tags: sitespeedio/sitespeed.io-autobuild:main

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Build autobuild container that runs tests on dashboard.sitespeed.io
on:
  push:
    branches:
    - main
  # release.yml dispatches this workflow after the "new version" commit lands,
  # because that commit is pushed with GITHUB_TOKEN and so doesn't trigger
  # push-based workflows on its own.
  workflow_dispatch:
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  docker:
    timeout-minutes: 30
    runs-on: latchkey-small
    # On workflow_dispatch the head_commit object is null, so the docs: skip
    # heuristic only applies to real pushes.
    if: ${{ github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message, 'docs:') }}
    steps:
      -
        name: Harden Runner
        uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
        with:
          egress-policy: audit
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
      -
        name: Login to DockerHub
        uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build and push sitespeed.io
        uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
        with:
          platforms: linux/amd64
          push: true
          provenance: false
          tags: sitespeedio/sitespeed.io-autobuild:main

What changed

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:

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow