Guidelines for agentic coding agents operating in this repository.
This is a GitHub Actions Composite Action template. The main file is action.yml.
- Language: YAML (GitHub Actions)
- Package Manager: None
- Testing: GitHub Actions workflows
Tests run via GitHub Actions. The test workflow (.github/workflows/test.yml) runs on:
pusheventspull_requestevents
Tests on multiple OSes: ubuntu-latest, macos-latest, windows-latest.
The workflow includes these test scenarios:
- Default test: Run action with default inputs, verify
tq --versionandtq --help - TOML parsing: Create
example.tomland verifytq -r -f example.toml 'test.key'returns correct value - Version input: Run action with
version: 0.2.1andcache: false, verify exact version - Output formats: Test JSON and raw output formats
Use act to run the full test workflow. There is no way to run a single test locally.
act -W .github/workflows/test.yml
act -W .github/workflows/test.yml --platform ubuntu-latestThe lint workflow (.github/workflows/lint.yml) runs on push and pull requests. It uses yamllint -d relaxed . to validate all YAML files.
To run locally: yamllint -d relaxed .
Automated via .github/workflows/release-please.yml - triggered on push to master branch, uses "simple" release type.
- Keep it simple: Minimal composite action template
- YAML format: 2-space indentation
- Descriptive names: Clear names for inputs, steps, and jobs
Required: Use Conventional Commits format:
<type>(<scope>): <description>
Types: fix, feat, docs, chore, refactor, test
Examples:
feat: add new input parameter
fix: resolve issue with default value
docs: update README
- 2-space indentation
- Hyphen
-for list items - Quote strings with special characters
- Use anchor aliases (
&anchor,*alias) for reusable fragments
name: <action-name>
description: <description>
author: <username>
inputs:
<input-name>:
description: <description>
required: false
default: <value>
runs:
using: composite
steps:
- name: <step-name>
uses: <action>
with:
<key>: <value>
shell: bash
run: |
<commands>
env:
<VAR>: ${{ inputs.<input> }}
branding:
icon: <icon-name>
color: <color>- Action/Input/Job names: kebab-case
- Step names: Title case
- Environment variables: SCREAMING_SNAKE_CASE
- Specify
permissions(principle of least privilege) - Pin action versions (e.g.,
actions/checkout@v6) - Use
with:for inputs - Use
id:on steps when referencing outputs
- Steps fail on errors by default
- Use
if: ${{ always() }}orif: ${{ failure() }}when needed - Check for required inputs
.
├── action.yml
├── .github/workflows/
│ ├── lint.yml
│ ├── test.yml
│ ├── commitlint.yml
│ └── release-please.yml
├── README.md
├── LICENSE
└── version.txt
- Add to
inputs:inaction.yml - Add
with:in steps using it - Update
README.md
Add a step in .github/workflows/test.yml:
- name: Run action with <scenario>
uses: ./
with:
<input>: <value>