Templates and reusable steps
Reusable steps
Section titled “Reusable steps”A reusable step is described by a step.yaml manifest and distributed as an OCI artifact (an image or a JS bundle), or lives in your repository.
name: docker-builddescription: Build and push an OCI imageinputs: context: { type: string, default: "." } push: { type: boolean, default: true }outputs: digest: { description: Image digest }runs: using: docker # docker | node22 | composite image: ghcr.io/slipway/steps/docker-build:1Use it with uses: owner/name@ref. Pin to a version or a digest. For local steps use uses: ./.slipway/steps/foo.
Org-level templates
Section titled “Org-level templates”Templates are plain YAML with parameters: and ${{ parameters.x }}. Versions are immutable once published, so a pipeline that pins @v1 cannot change under you.
# template org/go-service@v1parameters: go_version: { type: string, default: "1.27" }jobs: - name: test container: { image: "golang:${{ parameters.go_version }}" } steps: - uses: slipway/checkout@v1 - run: go test ./...Use a template at step, job or stage level:
steps: - template: org/lint@v1 with: { paths: ./... }Inheriting a whole pipeline
Section titled “Inheriting a whole pipeline”version: 1extends: org/base-pipeline@v2# override by namejobs: - name: test steps: - run: make testWith extends, name is optional and stages/jobs replace or add to the base by name. Use this for an organisation-wide golden path while letting teams override a single job.
Governance
Section titled “Governance”Templates are how a platform team gives developers safe defaults: a base pipeline with approved scanning and signing jobs, with per-service overrides. Combine with environment policy gates to require that a release was produced by a pipeline that extends the approved base.