CICD-109 · Define a composite action
Encyclopedia · Workflow reuse and caching · All snippets
Previous · CICD-108 · Next · CICD-110
1. Where it fits
- Placement In a local action's
.github/actions/smoke/action.ymlfile. - Prerequisites trusted checkout and cache/artifact support verified on the chosen Actions runner.
- Platforms github-actions, gitea-actions.
2. Copy the snippet
yaml
name: Smoke fixture
description: Check the fixture input exists
runs:
using: composite
steps:
- shell: bash
run: test -s fixture.txt3. How it works
A composite action packages several steps as a single action call. Here the embedded run step declares its shell explicitly.
4. Verify the result
Save as .github/actions/smoke/action.yml. A composite run step requires a shell.
Validation syntax-validated (YAML parse). Status definitions.