33# GitHub Reusable Workflow: Node.js Continuous Integration
44
55<div align =" center " >
6- <img src =" https://opengraph.githubassets.com/5fd994d3cdc848d200848f3b6e7693134d2fdbb92fc8c26a36ed3d12601d2dee /hoverkraft-tech/ci-github-nodejs " width =" 60px " align =" center " alt =" Node.js Continuous Integration " />
6+ <img src =" https://opengraph.githubassets.com/fd6ff0f289f07764817fe8ee5dc4b9f62ff6d96f3bfca597ac738f864276bfdf /hoverkraft-tech/ci-github-nodejs " width =" 60px " align =" center " alt =" Node.js Continuous Integration " />
77</div >
88
99---
@@ -42,7 +42,7 @@ Workflow to performs continuous integration steps agains a Node.js project:
4242
4343## Usage
4444
45- ``` yaml
45+ ```` yaml
4646name : Node.js Continuous Integration
4747on :
4848 push :
@@ -54,9 +54,41 @@ permissions:
5454 id-token : write
5555jobs :
5656 continuous-integration :
57- uses : hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@6809332ced7647b3d52300a47d65657283f3395e # 0.16.0
57+ uses : hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36c861e31804957f2a85503b8aebe213f35b1235 # feat/continuous-intergration-build-secrets
58+ secrets :
59+ # Secrets to be used during the build step.
60+ # Must be a multi-line env formatted string.
61+ # Example:
62+ # ```txt
63+ # SECRET_EXAMPLE=$\{{ secrets.SECRET_EXAMPLE }}
64+ # ```
65+ build-secrets : " "
5866 with :
5967 # Build parameters. Must be a string or a JSON object.
68+ # For string, provide a list of commands to run during the build step, one per line.
69+ # For JSON object, provide the following properties:
70+ #
71+ # - `commands`: Array of commands to run during the build step.
72+ # - `env`: Object of environment variables to set during the build step.
73+ # - `artifact`: String or array of strings specifying paths to artifacts to upload after the build
74+ #
75+ # Example:
76+ # ```json
77+ # {
78+ # "commands": [
79+ # "build",
80+ # "generate-artifacts"
81+ # ],
82+ # "env": {
83+ # "CUSTOM_ENV_VAR": "value"
84+ # },
85+ # "artifact": [
86+ # "dist/",
87+ # "packages/package-a/build/"
88+ # ]
89+ # }
90+ # ```
91+ #
6092 # Default: `build`
6193 build : build
6294
87119 # Working directory where the dependencies are installed.
88120 # Default: `.`
89121 working-directory : .
90- ` ` `
122+ ` ` ` `
91123
92124<!-- usage:end -->
93125
@@ -97,20 +129,39 @@ jobs:
97129
98130# ## Workflow Call Inputs
99131
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** | `.` |
132+ | **Input** | **Description** | **Required** | **Type** | **Default** |
133+ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | ------------ |
134+ | **`build`** | Build parameters. Must be a string or a JSON object. | **false** | **string** | `build` |
135+ | | For string, provide a list of commands to run during the build step, one per line. | | | |
136+ | | For JSON object, provide the following properties : | | | |
137+ | | | | | |
138+ | | - `commands` : Array of commands to run during the build step. | | | |
139+ | | - `env` : Object of environment variables to set during the build step. | | | |
140+ | | - `artifact` : String or array of strings specifying paths to artifacts to upload after the build | | | |
141+ | | | | | |
142+ | | Example : | | | |
143+ | | <!-- textlint-disable --><pre lang="json">{ "commands": [ "build", "generate-artifacts" ], "env": { "CUSTOM_ENV_VAR": "value" }, "artifact": [ "dist/", "packages/package-a/build/" ] }</pre><!-- textlint-enable --> | | | |
144+ | **`checks`** | Optional flag to enable check steps. | **false** | **boolean** | `true` |
145+ | **`lint`** | Optional flag to enable linting. | **false** | **boolean** | `true` |
146+ | **`code-ql`** | Code QL analysis language. See <https://github.com/github/codeql-action>. | **false** | **string** | `typescript` |
147+ | **`dependency-review`** | Enable dependency review scan. See <https://github.com/actions/dependency-review-action>. | **false** | **boolean** | `true` |
148+ | **`test`** | Optional flag to enable test. | **false** | **boolean** | `true` |
149+ | **`coverage`** | Specifify code coverage reporter. Supported values : ` codecov` . | **false** | **string** | `codecov` |
150+ | **`working-directory`** | Working directory where the dependencies are installed. | **false** | **string** | `.` |
110151
111152<!-- inputs:end -->
112153
113154<!-- secrets:start -->
155+
156+ # # Secrets
157+
158+ | **Secret** | **Description** | **Required** |
159+ | ------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------ |
160+ | **`build-secrets`** | Secrets to be used during the build step. | **false** |
161+ | | Must be a multi-line env formatted string. | |
162+ | | Example : | |
163+ | | <!-- textlint-disable --><pre lang="txt">SECRET_EXAMPLE=$\{{ secrets.SECRET_EXAMPLE }}</pre><!-- textlint-enable --> | |
164+
114165<!-- secrets:end -->
115166
116167<!-- outputs:start -->
133184
134185jobs:
135186 continuous-integration:
136- uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@6809332ced7647b3d52300a47d65657283f3395e # 0.16.0
187+ uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36c861e31804957f2a85503b8aebe213f35b1235 # feat/continuous-intergration-build-secrets
137188 permissions:
138189 id-token: write
139190 security-events: write
0 commit comments