1- <!-- start title -->
1+ <!-- header: start -->
22
33# GitHub Reusable Workflow: Node.js Continuous Integration
44
5- <!-- end title -->
6- <!-- start description -->
5+ <div align =" center " >
6+ <img src =" https://opengraph.githubassets.com/e970d0dbe9ef0b2c9d7908a082cdee394d80b51dbba83dab5821ba6e49341f8d/hoverkraft-tech/ci-github-nodejs " width =" 60px " align =" center " alt =" NodeJS Continuous Integration " />
7+ </div >
8+
9+ ---
10+
11+ <!-- header:end -->
12+
13+ <!-- badges:start -->
14+
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+
22+ <!-- overview:start -->
23+
24+ ## Overview
725
826Workflow to performs continuous integration steps agains a Node.js project:
927
@@ -12,68 +30,99 @@ Workflow to performs continuous integration steps agains a Node.js project:
1230- Build
1331- Test
1432
15- <!-- end description -->
16- <!-- start contents -->
17- <!-- end contents -->
18- <!-- start usage -->
33+ ### Permissions
1934
20- ``` yaml
21- name : Nodejs Continuous Integration
35+ - ** ` contents ` ** : ` read `
36+ - ** ` security-events ` ** : ` write `
37+ - ** ` id-token ` ** : ` write `
38+
39+ <!-- overview:end -->
40+
41+ <!-- usage:start -->
2242
43+ ## Usage
44+
45+ ``` yaml
46+ name : NodeJS Continuous Integration
2347on :
24- merge_group :
2548 push :
26- branches : [main]
27- pull_request :
28- branches : [main]
29-
49+ branches :
50+ - main
3051permissions :
3152 contents : read
3253 security-events : write
33- # FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
3454 id-token : write
35-
3655jobs :
3756 continuous-integration :
38- uses : hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@0.14.1
57+ uses : hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@1d00c9eb280acbee5df4b4a2087f786e66b13d87 # 0.14.1
58+ with :
59+ # Build parameters. Must be a string or a json object.
60+ # Default: `build`
61+ build : build
62+
63+ # Optional flag to enable check steps.
64+ # Default: `true`
65+ checks : true
66+
67+ # Optional flag to enable linting.
68+ # Default: `true`
69+ lint : true
70+
71+ # Code QL analysis language. See <https://github.com/github/codeql-action>.
72+ # Default: `typescript`
73+ code-ql : typescript
74+
75+ # Enable dependency review scan. See <https://github.com/actions/dependency-review-action>.
76+ # Default: `true`
77+ dependency-review : true
78+
79+ # Optional flag to enable test.
80+ # Default: `true`
81+ test : true
82+
83+ # Specifify code coverage reporter. Supported values: 'codecov'.
84+ # Default: `codecov`
85+ coverage : codecov
86+
87+ # Working directory where the dependencies are installed.
88+ # Default: `.`
89+ working-directory : .
3990` ` `
4091
41- <!-- end usage -->
42- <!-- start secrets -->
43- <!-- end secrets -->
44- <!-- start inputs -->
92+ <!-- usage:end -->
93+
94+ <!-- inputs:start -->
4595
4696## Inputs
4797
48- | **Input** | **Description** | **Type** | **Default** | **Required** |
49- | ------------------------- | ------------------------------------------------------------------------- | -------------------- | ------------------------- | ------------ |
50- | **<code>build</code>** | Build parameters. Must be a string or a JSON array of strings or object. | <code>string</code> | <code>build</code> | **false** |
51- | **<code>checks</code>** | Optional flag to enable check steps. | <code>boolean</code> | <code>true</code> | **false** |
52- | **<code>code-ql</code>** | Code QL analysis language. See <https://github.com/github/codeql-action>. | <code>string</code> | <code>` typescript`</code> | **false** |
53- | **<code>lint</code>** | Optional flag to enable linting. | <code>boolean</code> | <code>true</code> | **false** |
54- | **<code>test</code>** | Optional flag to enable test. | <code>boolean</code> | <code>true</code> | **false** |
55- | **<code>coverage</code>** | Specifify code coverage reporter. Supported values : ` codecov` . | <code>string</code> | <code>`codecov`</code> | **false** |
98+ ### Workflow Call Inputs
99+
100+ | **Input** | **Description** | **Required** | **Type** | **Default** |
101+ | ----------------------- | ----------------------------------------------------------------------------------------- | ------------ | ----------- | ------------ |
102+ | **` build`** | Build parameters. Must be a string or a JSON object. | **false** | **string** | `build` |
103+ | **`checks`** | Optional flag to enable check steps. | **false** | **boolean** | `true` |
104+ | **`lint`** | Optional flag to enable linting. | **false** | **boolean** | `true` |
105+ | **`code-ql`** | Code QL analysis language. See <https://github.com/github/codeql-action>. | **false** | **string** | `typescript` |
106+ | **`dependency-review`** | Enable dependency review scan. See <https://github.com/actions/dependency-review-action>. | **false** | **boolean** | `true` |
107+ | **`test`** | Optional flag to enable test. | **false** | **boolean** | `true` |
108+ | **`coverage`** | Specifify code coverage reporter. Supported values : ' Codecov' . | **false** | **string** | `codecov` |
109+ | **`working-directory`** | Working directory where the dependencies are installed. | **false** | **string** | `.` |
56110
57- # ## `build` input parameters
111+ <!-- inputs:end -->
58112
59- When `build` is a JSON object, the following parameters are supported :
113+ <!-- secrets:start -->
114+ <!-- secrets:end -->
60115
61- | **Input** | **Description** | **Type** | **Default** | **Required** |
62- | ---------- | -------------------------------------------------------------------------------------------------------- | ------------------ | ----------- | ------------ |
63- | `commands` | Build command(s). | string[] | `["build"]` | **false** |
64- | `artifact` | Build artifact (name will be `build`) to be uploaded. (See <https://github.com/actions/upload-artifact>) | string or string[] | `` | **false** |
116+ <!-- outputs:start -->
117+ <!-- outputs:end -->
65118
66- <!-- end inputs -->
67- <!-- start outputs -->
68- <!-- end outputs -->
69- <!-- start [.github/ghadocs/examples/] -->
119+ <!-- examples:start -->
70120
71121# # Examples
72122
73123# ## Continuous Integration, build and publish
74124
75125` ` ` yaml
76-
77126name: Continuous Integration - Build and Publish
78127
79128name: Nodejs Continuous Integration
84133
85134jobs:
86135 continuous-integration:
87- uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@0.14.1
136+ uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@1d00c9eb280acbee5df4b4a2087f786e66b13d87 # 0.14.1
88137 permissions:
89138 id-token: write
90139 security-events: write
@@ -119,4 +168,37 @@ jobs:
119168 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
120169` ` `
121170
122- <!-- end [.github/ghadocs/examples/] -->
171+ <!-- examples:end -->
172+
173+ <!-- contributing:start -->
174+
175+ # # Contributing
176+
177+ Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) for more details.
178+
179+ <!-- contributing:end -->
180+
181+ <!-- security:start -->
182+ <!-- security:end -->
183+
184+ <!-- license:start -->
185+
186+ # # License
187+
188+ This project is licensed under the MIT License.
189+
190+ SPDX-License-Identifier : MIT
191+
192+ Copyright © 2025 hoverkraft-tech
193+
194+ For more details, see the [license](http://choosealicense.com/licenses/mit/).
195+
196+ <!-- license:end -->
197+
198+ <!-- generated:start -->
199+
200+ ---
201+
202+ This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).
203+
204+ <!-- generated:end -->
0 commit comments