Skip to content

Commit 87f6ede

Browse files
committed
docs: add instructions for agents
Signed-off-by: Emilien Escalle <[email protected]>
1 parent 3f2f875 commit 87f6ede

File tree

4 files changed

+118
-12
lines changed

4 files changed

+118
-12
lines changed

AGENTS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# AGENTS.md — agent instructions and operational contract
2+
3+
This file is written for automated coding agents (for example: Copilot coding agents). It exists to provide a concise operational contract and guardrails for agents working in this repository. It is not the canonical source for design or style rules. Those live in the developer documentation linked below.
4+
5+
## Organization-wide guidelines (required)
6+
7+
- Follow the prioritized shared instructions in [hoverkraft-tech/.github/AGENTS.md](https://github.com/hoverkraft-tech/.github/blob/main/AGENTS.md) before working in this repository.
8+
9+
## Quick Start
10+
11+
This project contains **opinionated GitHub Actions and reusable workflows** to standardize OCI image build, publication, and Helm chart promotion pipelines. For comprehensive documentation, see the main [README.md](README.md).
12+
13+
### Key Sections to Reference
14+
15+
- **[Overview](README.md#overview)** – Project purpose and scope
16+
- **[Actions](README.md#actions)** – Catalog of container-focused actions grouped by category
17+
- **[Reusable Workflows](README.md#reusable-workflows)** – Orchestration playbooks for common CI tasks
18+
- **[Contributing](README.md#contributing)** – Contribution guidelines, action structure patterns, and development standards
19+
- **[Development Workflow](README.md#development-workflow)** – Commands for linting, testing, and local development
20+
21+
## Agent-Specific Development Patterns
22+
23+
### Critical Workflow Knowledge
24+
25+
```bash
26+
# Essential commands for development
27+
make lint # Run the dockerized Super Linter
28+
make lint-fix # Attempt auto-fixes for lint findings
29+
make test-build-application # Build and push the sample test application image
30+
make test-ct-install # Validate Helm charts via chart-testing
31+
```
32+
33+
For detailed documentation on each action and workflow, refer to the individual readme files linked in the main [README.md](README.md).

README.md

Lines changed: 78 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@
1010

1111
</div>
1212

13-
Opinionated GitHub Actions and workflows for continuous integration in container (OCI) context
14-
1513
---
1614

15+
## Overview
16+
17+
Opinionated GitHub Actions and reusable workflows to build, test, sign, and distribute container images and Helm charts. The goal is to offer a consistent supply-chain friendly pipeline for OCI assets managed within GitHub Actions.
18+
1719
## Actions
1820

1921
### Docker
2022

23+
_Actions that operate on OCI images across their build, metadata, and lifecycle management phases._
24+
2125
#### - [Build image](actions/docker/build-image/README.md)
2226

2327
#### - [Create images manifests](actions/docker/create-images-manifests/README.md)
@@ -32,6 +36,8 @@ Opinionated GitHub Actions and workflows for continuous integration in container
3236

3337
### Helm
3438

39+
_Actions dedicated to packaging, validating, and publishing Helm charts for Kubernetes deployments._
40+
3541
#### - [Generate chart documentation](actions/helm/generate-docs/README.md)
3642

3743
#### - [Parse chart URI](actions/helm/parse-chart-uri/README.md)
@@ -42,13 +48,77 @@ Opinionated GitHub Actions and workflows for continuous integration in container
4248

4349
## Reusable Workflows
4450

51+
_Orchestrated workflows you can plug directly into repositories to automate container-focused CI routines._
52+
4553
### - [Docker build images](.github/workflows/docker-build-images.md)
4654

4755
### - [Prune pull requests images tags](.github/workflows/prune-pull-requests-images-tags.md)
4856

4957
## Contributing
5058

51-
👍 If you wish to contribute to this project, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file, PRs are Welcome !
59+
Contributions are welcome! Please review the [contributing guidelines](CONTRIBUTING.md) before opening a PR.
60+
61+
### Action Structure Pattern
62+
63+
All actions follow a consistent layout:
64+
65+
```text
66+
actions/{category}/{action-name}/
67+
├── action.yml # Action definition with inputs/outputs
68+
├── README.md # Usage documentation and examples
69+
└── index.js / scripts # Optional Node.js helpers (when required)
70+
```
71+
72+
### Development Standards
73+
74+
#### Action Definition Standards
75+
76+
1. **Consistent branding**: Use `author: hoverkraft` with `color: blue` and a meaningful `icon`.
77+
2. **Pinned dependencies**: Reference third-party actions via exact SHAs to guarantee reproducibility.
78+
3. **Input validation**: Validate critical inputs early within composite steps or supporting scripts.
79+
80+
#### Container Delivery Patterns
81+
82+
- Prefer multi-architecture builds via `docker buildx build` with explicit `--platform` lists.
83+
- Surface provenance metadata through outputs (`image-name`, `digest`, etc.) to unblock downstream jobs.
84+
- Keep secrets and registry credentials in GitHub environments or organization secrets—never hardcode them.
85+
86+
### Development Workflow
87+
88+
#### Linting & Testing
89+
90+
```bash
91+
make lint # Run the dockerized Super Linter
92+
make lint-fix # Attempt auto-fixes for lint findings
93+
94+
# Container & Helm validation helpers
95+
make test-build-application # Build and push the sample test application image
96+
make test-ct-install # Validate Helm charts via chart-testing
97+
```
98+
99+
#### File Conventions
100+
101+
- **Dockerfile**: Provides the Super Linter environment with UID/GID passthrough for local dev parity.
102+
- **Tests**: Located in `tests/` with fixtures for container builds and chart-testing scenarios.
103+
- **Workflows**: Reusable definitions live in `.github/workflows/`; internal/private workflows are prefixed with `__`.
104+
105+
#### Action Development Conventions
106+
107+
1. **Idempotent steps**: Ensure actions can run multiple times without leaving residual state in the workspace.
108+
2. **Logging**: Use structured logs with clear prefixes (`[build-image]`, `[helm-test-chart]`, …) to simplify debugging.
109+
3. **Security**: Avoid shell interpolation with untrusted inputs; prefer parameterized commands or `set -euo pipefail` wrappers.
110+
111+
#### JavaScript Development Patterns
112+
113+
- Encapsulate reusable logic in modules under the action directory (for example, `actions/docker/prune-pull-requests-image-tags/index.js`).
114+
- Prefer async/await with explicit error handling when interacting with the GitHub API or filesystem.
115+
- Centralize environment variable parsing and validation to keep composite YAML lean.
116+
117+
#### Helm Testing Patterns
118+
119+
- Use the chart fixtures under `tests/charts/` to exercise Helm-focused actions.
120+
- Maintain `Chart.lock` files alongside `Chart.yaml` to document dependency revisions.
121+
- Commit `ci/empty-values.yaml` templates for creating scenario-specific overrides.
52122

53123
## Author
54124

@@ -59,5 +129,8 @@ Opinionated GitHub Actions and workflows for continuous integration in container
59129

60130
## License
61131

62-
📝 Copyright © 2023 [Hoverkraft <[email protected]>](https://hoverkraft.cloud).<br />
63-
This project is [MIT](LICENSE) licensed.
132+
This project is licensed under the MIT License.
133+
134+
SPDX-License-Identifier: MIT
135+
136+
© 2025 hoverkraft-tech. See [LICENSE](LICENSE) for details.

tests/charts/application/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ A Helm chart for Kubernetes
66

77
## Requirements
88

9-
| Repository | Name | Version |
10-
| ---------------------------------- | ----- | ------- |
11-
| https://charts.bitnami.com/bitnami | mysql | 14.0.3 |
9+
| Repository | Name | Version |
10+
| ------------------------------------ | ----- | ------- |
11+
| <https://charts.bitnami.com/bitnami> | MySQL | 14.0.3 |
1212

1313
## Values
1414

tests/charts/umbrella-application/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ An umbrella Helm chart for Kubernetes
66

77
## Requirements
88

9-
| Repository | Name | Version |
10-
| ---------------------------------- | --------------- | ------- |
11-
| file://./charts/app | app | 0.0.0 |
12-
| https://charts.bitnami.com/bitnami | database(mysql) | 14.0.3 |
9+
| Repository | Name | Version |
10+
| ------------------------------------ | --------------- | ------- |
11+
| file://./charts/app | app | 0.0.0 |
12+
| <https://charts.bitnami.com/bitnami> | database(MySQL) | 14.0.3 |
1313

1414
## Values
1515

0 commit comments

Comments
 (0)