Skip to content

Commit 893bff4

Browse files
Copilotneilime
andcommitted
Update README with new CI actions section
Co-authored-by: neilime <[email protected]> Signed-off-by: Emilien Escalle <[email protected]>
1 parent 0bd11ae commit 893bff4

File tree

11 files changed

+306
-329
lines changed

11 files changed

+306
-329
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ This repository centralizes the Hoverkraft toolkit for building, testing, and sh
1818

1919
## Actions
2020

21+
### CI Actions
22+
23+
_Actions for continuous integration steps: build, lint, and test._
24+
25+
#### - [Build](actions/build/README.md)
26+
27+
#### - [Lint](actions/lint/README.md)
28+
29+
#### - [Test](actions/test/README.md)
30+
2131
### Dependencies
2232

2333
_Actions dedicated to caching and validating Node.js dependencies._

actions/build/README.md

Lines changed: 113 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,132 @@
1-
# Build Action
1+
<!-- header:start -->
22

3-
Composite action to build Node.js projects with support for custom commands, environment variables, and artifact handling.
3+
# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcGFja2FnZSIgY29sb3I9ImdyYXktZGFyayI+PGxpbmUgeDE9IjE2LjUiIHkxPSI5LjQiIHgyPSI3LjUiIHkyPSI0LjIxIj48L2xpbmU+PHBhdGggZD0iTTIxIDE2VjhhMiAyIDAgMCAwLTEtMS43M2wtNy00YTIgMiAwIDAgMC0yIDBsLTcgNEEyIDIgMCAwIDAgMyA4djhhMiAyIDAgMCAwIDEgMS43M2w3IDRhMiAyIDAgMCAwIDIgMGw3LTRBMiAyIDAgMCAwIDIxIDE2eiI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjMuMjcgNi45NiAxMiAxMi4wMSAyMC43MyA2Ljk2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjIyLjA4IiB4Mj0iMTIiIHkyPSIxMiI+PC9saW5lPjwvc3ZnPg==) GitHub Action: Build
4+
5+
<div align="center">
6+
<img src="https://opengraph.githubassets.com/b83a39d0a270998cbae0974683a11eba4481aa44bbb4abbc39522474251c5b0a/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Build" />
7+
</div>
8+
9+
---
10+
11+
<!-- header:end -->
12+
<!-- badges:start -->
13+
14+
[![Marketplace](https://img.shields.io/badge/Marketplace-build-blue?logo=github-actions)](https://github.com/marketplace/actions/build)
15+
[![Release](https://img.shields.io/github/v/release/hoverkraft-tech/ci-github-nodejs)](https://github.com/hoverkraft-tech/ci-github-nodejs/releases)
16+
[![License](https://img.shields.io/github/license/hoverkraft-tech/ci-github-nodejs)](http://choosealicense.com/licenses/mit/)
17+
[![Stars](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)
18+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md)
19+
20+
<!-- badges:end -->
21+
<!-- overview:start -->
22+
23+
## Overview
24+
25+
Action to build Node.js projects with support for custom commands, environment variables, and artifact handling
26+
27+
<!-- overview:end -->
28+
<!-- usage:start -->
429

530
## Usage
631

7-
```yaml
8-
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@main
32+
````yaml
33+
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@db1c1d36ff3e87c4513eded15d85acb78dcbd9b9 # copilot/refactor-ci-actions-lint-test
934
with:
10-
# Working directory where build commands are executed
11-
# Default: "."
12-
working-directory: "."
13-
14-
# List of build commands to execute (npm/pnpm/yarn script names)
15-
# Required
16-
build-commands: |
17-
build
18-
compile
19-
20-
# JSON object of environment variables for the build
21-
# Default: "{}"
22-
build-env: |
23-
{
24-
"NODE_ENV": "production",
25-
"API_URL": "https://api.example.com"
26-
}
27-
28-
# Multi-line string of secrets in env format
29-
# Default: ""
30-
build-secrets: |
31-
SECRET_KEY=${{ secrets.SECRET_KEY }}
32-
API_TOKEN=${{ secrets.API_TOKEN }}
33-
34-
# JSON object for artifact upload configuration
35-
# Default: ""
36-
build-artifact: |
37-
{
38-
"name": "build-artifacts",
39-
"paths": "dist/\nbuild/"
40-
}
35+
# Working directory where the build commands are executed.
36+
# Can be absolute or relative to the repository root.
37+
#
38+
# Default: `.`
39+
working-directory: .
40+
41+
# List of build commands to execute, one per line.
42+
# These are npm/pnpm/yarn script names (e.g., "build", "compile").
43+
#
44+
# This input is required.
45+
build-commands: ""
46+
47+
# JSON object of environment variables to set during the build.
48+
# Example: {"NODE_ENV": "production", "API_URL": "https://api.example.com"}
49+
#
50+
# Default: `{}`
51+
build-env: "{}"
52+
53+
# Multi-line string of secrets in env format (KEY=VALUE).
54+
# Example:
55+
# ```
56+
# SECRET_KEY=${{ secrets.SECRET_KEY }}
57+
# API_TOKEN=${{ secrets.API_TOKEN }}
58+
# ```
59+
build-secrets: ""
60+
61+
# JSON object specifying artifact upload configuration.
62+
# Format: {"name": "artifact-name", "paths": "path1\npath2"}
63+
build-artifact: ""
4164

4265
# Whether running in container mode (skips checkout and node setup)
43-
# Default: "false"
66+
# Default: `false`
4467
container: "false"
45-
```
68+
````
69+
70+
<!-- usage:end -->
71+
<!-- inputs:start -->
4672

4773
## Inputs
4874

49-
| Name | Description | Required | Default |
50-
| ------------------- | ---------------------------------------------------------------------------- | -------- | ------- |
51-
| `working-directory` | Working directory where build commands are executed | No | `.` |
52-
| `build-commands` | List of build commands to execute (npm/pnpm/Yarn script names), one per line | Yes | - |
53-
| `build-env` | JSON object of environment variables to set during the build | No | `{}` |
54-
| `build-secrets` | Multi-line string of secrets in env format (KEY=VALUE) | No | `""` |
55-
| `build-artifact` | JSON object specifying artifact upload configuration | No | `""` |
56-
| `container` | Whether running in container mode (skips checkout and node setup) | No | `false` |
75+
| **Input** | **Description** | **Required** | **Default** |
76+
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- |
77+
| **`working-directory`** | Working directory where the build commands are executed. | **false** | `.` |
78+
| | Can be absolute or relative to the repository root. | | |
79+
| **`build-commands`** | List of build commands to execute, one per line. | **true** | - |
80+
| | These are npm/pnpm/Yarn script names (e.g., "build", "compile"). | | |
81+
| **`build-env`** | JSON object of environment variables to set during the build. | **false** | `\{}` |
82+
| | Example: {"NODE_ENV": "production", "API_URL": "<https://api.example.com"}> | | |
83+
| **`build-secrets`** | Multi-line string of secrets in env format (KEY=VALUE). | **false** | - |
84+
| | Example: | | |
85+
| | <!-- textlint-disable --><pre>SECRET_KEY=${{ secrets.SECRET_KEY }}&#13;API_TOKEN=${{ secrets.API_TOKEN }}</pre><!-- textlint-enable --> | | |
86+
| **`build-artifact`** | JSON object specifying artifact upload configuration. | **false** | - |
87+
| | Format: {"name": "artifact-name", "paths": "path1\npath2"} | | |
88+
| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` |
89+
90+
<!-- inputs:end -->
91+
<!-- secrets:start -->
92+
<!-- secrets:end -->
93+
<!-- outputs:start -->
5794

5895
## Outputs
5996

60-
| Name | Description |
61-
| ------------- | ------------------------------------------------------- |
62-
| `artifact-id` | ID of the uploaded artifact (if artifact was specified) |
97+
| **Output** | **Description** |
98+
| ----------------- | ------------------------------------------------------- |
99+
| **`artifact-id`** | ID of the uploaded artifact (if artifact was specified) |
63100

64-
## Examples
101+
<!-- outputs:end -->
102+
<!-- examples:start -->
103+
<!-- examples:end -->
104+
<!-- contributing:start -->
65105

66-
### Basic build
106+
## Contributing
67107

68-
```yaml
69-
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@main
70-
with:
71-
build-commands: "build"
72-
```
108+
Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) for more details.
73109

74-
### Build with artifact upload
110+
<!-- contributing:end -->
111+
<!-- security:start -->
112+
<!-- security:end -->
113+
<!-- license:start -->
75114

76-
```yaml
77-
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@main
78-
with:
79-
build-commands: |
80-
build
81-
package
82-
build-artifact: |
83-
{
84-
"name": "build-output",
85-
"paths": "dist/"
86-
}
87-
```
88-
89-
### Build with environment variables and secrets
90-
91-
```yaml
92-
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@main
93-
with:
94-
build-commands: "build"
95-
build-env: |
96-
{
97-
"NODE_ENV": "production",
98-
"API_URL": "https://api.example.com"
99-
}
100-
build-secrets: |
101-
SECRET_KEY=${{ secrets.SECRET_KEY }}
102-
```
115+
## License
116+
117+
This project is licensed under the MIT License.
118+
119+
SPDX-License-Identifier: MIT
120+
121+
Copyright © 2025 Hoverkraft
122+
123+
For more details, see the [license](http://choosealicense.com/licenses/mit/).
124+
125+
<!-- license:end -->
126+
<!-- generated:start -->
127+
128+
---
129+
130+
This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).
131+
132+
<!-- generated:end -->

actions/build/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "Build"
22
description: "Action to build Node.js projects with support for custom commands, environment variables, and artifact handling"
3-
author: Hoverkraft
3+
author: hoverkraft
44
branding:
55
icon: package
6-
color: gray-dark
6+
color: blue
77

88
inputs:
99
working-directory:

actions/dependencies-cache/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "Dependencies cache"
22
description: "Action to setup dependencies cache managment."
3-
author: Hoverkraft
3+
author: hoverkraft
44
branding:
55
icon: archive
6-
color: gray-dark
6+
color: blue
77

88
inputs:
99
dependencies:

actions/get-package-manager/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "Get package manager"
22
description: "Action to detect the package manager used. Supports Yarn, pnpm, and npm"
3-
author: Hoverkraft
3+
author: hoverkraft
44
branding:
55
icon: package
6-
color: gray-dark
6+
color: blue
77

88
inputs:
99
working-directory:

actions/has-installed-dependencies/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "Has installed dependencies"
22
description: "Action to check if dependencies have been installed according to the package manager used."
3-
author: Hoverkraft
3+
author: hoverkraft
44
branding:
55
icon: settings
6-
color: gray-dark
6+
color: blue
77

88
inputs:
99
dependencies:

0 commit comments

Comments
 (0)