Skip to content
Latchkey

How to Share Starter Workflows With an Org .github Repo

A repo literally named .github in your org holds starter workflows and org defaults that every other repo can pull from.

Create a repo named .github in the org. Put starter workflows under workflow-templates/ with a .properties.json describing each. They then appear as suggestions when any org repo adds a workflow.

Steps

  • Create a repo named .github in the organization.
  • Add workflow-templates/ci.yml and workflow-templates/ci.properties.json.
  • Use $default-branch and $protected-branches placeholders the template engine substitutes.

Starter workflow template

workflow-templates/ci.yml
on:
  push:
    branches: [ $default-branch ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm test

Template metadata

workflow-templates/ci.properties.json
{
  "name": "Org Node CI",
  "description": "Standard Node build and test for org repos.",
  "iconName": "example",
  "categories": ["Node"]
}

Gotchas

  • Starter workflows are copied into a repo once; later template edits do not update repos that already adopted them.
  • For live-updating shared logic, prefer a reusable workflow_call workflow over a starter template.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →