Skip to content
Latchkey

Update README workflow (zed-industries/awesome-gpui)

The Update README workflow from zed-industries/awesome-gpui, explained and optimized by Latchkey.

C

CI health: C - fair

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

Grade your own workflow free or run it on Latchkey →
Source: zed-industries/awesome-gpui.github/workflows/update-readme.ymlLicense CC0-1.0View source

What it does

This is the Update README workflow from the zed-industries/awesome-gpui repository, a real project running GitHub Actions. It is shown here with attribution under its CC0-1.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Update README

on:
  schedule:
    - cron: "17 8 * * *"
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - projects.json
      - projects.schema.json
      - pyproject.toml
      - uv.lock
      - README.template.md
      - scripts/generate_readme.py
      - .github/workflows/update-readme.yml

permissions:
  contents: write

jobs:
  update-readme:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v6

      - name: Validate project data
        run: uv run check-jsonschema --schemafile projects.schema.json projects.json

      - name: Generate README
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: uv run scripts/generate_readme.py

      - name: Commit updated README
        run: |
          if git diff --quiet -- README.md; then
            echo "README.md is already current."
            exit 0
          fi
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add README.md
          git commit -m "Update README.md"
          git push

The same workflow, on Latchkey

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

name: Update README
 
on:
  schedule:
    - cron: "17 8 * * *"
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - projects.json
      - projects.schema.json
      - pyproject.toml
      - uv.lock
      - README.template.md
      - scripts/generate_readme.py
      - .github/workflows/update-readme.yml
 
permissions:
  contents: write
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  update-readme:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - name: Check out repository
        uses: actions/checkout@v4
 
      - name: Install uv
        uses: astral-sh/setup-uv@v6
 
      - name: Validate project data
        run: uv run check-jsonschema --schemafile projects.schema.json projects.json
 
      - name: Generate README
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: uv run scripts/generate_readme.py
 
      - name: Commit updated README
        run: |
          if git diff --quiet -- README.md; then
            echo "README.md is already current."
            exit 0
          fi
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add README.md
          git commit -m "Update README.md"
          git push
 

What changed

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 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