Release Production Stack Operator Docker Image workflow (vllm-project/production-stack)
The Release Production Stack Operator Docker Image workflow from vllm-project/production-stack, explained and optimized by Latchkey.
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.
What it does
This is the Release Production Stack Operator Docker Image workflow from the vllm-project/production-stack 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: Release Production Stack Operator Docker Image
on:
push:
branches:
- main
paths:
- 'operator/**'
workflow_dispatch:
jobs:
release:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
# Login to GitHub Container Registry (GHCR)
- name: Login to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: docker.io
username: lmcache
password: ${{ secrets.LMCACHE_DOCKER_SECRET }}
- name: Build and push image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
context: operator
file: operator/Dockerfile
push: true
# Unstable build on every merge to main; chart version tags come from helm-release workflow
tags: |
ghcr.io/${{ github.repository }}/production-stack-operator:latest
ghcr.io/${{ github.repository }}/production-stack-operator:${{ github.sha }}
lmcache/production-stack-operator:latest
lmcache/production-stack-operator:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/production-stack-operator:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/production-stack-operator:buildcache,mode=max
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: Release Production Stack Operator Docker Image on: push: branches: - main paths: - 'operator/**' workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: release: timeout-minutes: 30 permissions: contents: write packages: write runs-on: latchkey-small steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 # Login to GitHub Container Registry (GHCR) - name: Login to GHCR uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} # Login to Docker Hub - name: Login to Docker Hub uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: registry: docker.io username: lmcache password: ${{ secrets.LMCACHE_DOCKER_SECRET }} - name: Build and push image uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0 with: context: operator file: operator/Dockerfile push: true # Unstable build on every merge to main; chart version tags come from helm-release workflow tags: | ghcr.io/${{ github.repository }}/production-stack-operator:latest ghcr.io/${{ github.repository }}/production-stack-operator:${{ github.sha }} lmcache/production-stack-operator:latest lmcache/production-stack-operator:${{ github.sha }} cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/production-stack-operator:buildcache cache-to: type=registry,ref=ghcr.io/${{ github.repository }}/production-stack-operator:buildcache,mode=max
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. - Cancel superseded runs when a branch or PR gets a newer push.
- 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:
- Container pulls and builds
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.