Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions .github/workflows/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# GitHub Reusable Workflow: Node.js Continuous Integration

<div align="center">
<img src="https://opengraph.githubassets.com/5bff83a351121c577bee39e10ea7d6774aba5d0d7d7b114ba0e8b79d48d09267/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Node.js Continuous Integration" />
<img src="https://opengraph.githubassets.com/50237226ce5d3230f19bbf31d04efd98f21cb2150e9ae4acd09a498440ecde82/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Node.js Continuous Integration" />
</div>

---
Expand Down Expand Up @@ -34,6 +34,7 @@ Workflow to performs continuous integration steps agains a Node.js project:

- **`contents`**: `read`
- **`id-token`**: `write`
- **`pull-requests`**: `write`
- **`security-events`**: `write`

<!-- overview:end -->
Expand All @@ -51,7 +52,7 @@ on:
permissions: {}
jobs:
continuous-integration:
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@23af54bc615d657aa9c13c472ae701445c1811a6 # 0.17.1
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@32a69b7b8fd5f7ab7bf656e7e88aa90ad235cf8d # 0.18.0
secrets:
# Secrets to be used during the build step.
# Must be a multi-line env formatted string.
Expand Down Expand Up @@ -99,9 +100,12 @@ jobs:
# Default: `true`
checks: true

# Optional flag to enable linting.
# Whether to enable linting.
# Set to `null` or empty to disable.
# Accepts a JSON object for lint options. See [lint action](../actions/lint/README.md).
#
# Default: `true`
lint: true
lint: "true"

# Code QL analysis language. See <https://github.com/github/codeql-action>.
# Default: `typescript`
Expand All @@ -111,13 +115,12 @@ jobs:
# Default: `true`
dependency-review: true

# Optional flag to enable test.
# Whether to enable testing.
# Set to `null` or empty to disable.
# Accepts a JSON object for test options. See [test action](../actions/test/README.md).
#
# Default: `true`
test: true

# Specify code coverage reporter. Supported values: `codecov`.
# Default: `codecov`
coverage: codecov
test: "true"

# Working directory where the dependencies are installed.
# Default: `.`
Expand Down Expand Up @@ -150,11 +153,14 @@ jobs:
| | Example: | | | |
| | <!-- textlint-disable --><pre lang="json">{&#13; "commands": [&#13; "build",&#13; "generate-artifacts"&#13; ],&#13; "env": {&#13; "CUSTOM_ENV_VAR": "value"&#13; },&#13; "artifact": [&#13; "dist/",&#13; "packages/package-a/build/"&#13; ]&#13;}</pre><!-- textlint-enable --> | | | |
| **`checks`** | Optional flag to enable check steps. | **false** | **boolean** | `true` |
| **`lint`** | Optional flag to enable linting. | **false** | **boolean** | `true` |
| **`lint`** | Whether to enable linting. | **false** | **string** | `true` |
| | Set to `null` or empty to disable. | | | |
| | Accepts a JSON object for lint options. See [lint action](../actions/lint/README.md). | | | |
| **`code-ql`** | Code QL analysis language. See <https://github.com/github/codeql-action>. | **false** | **string** | `typescript` |
| **`dependency-review`** | Enable dependency review scan. See <https://github.com/actions/dependency-review-action>. | **false** | **boolean** | `true` |
| **`test`** | Optional flag to enable test. | **false** | **boolean** | `true` |
| **`coverage`** | Specify code coverage reporter. Supported values: `codecov`. | **false** | **string** | `codecov` |
| **`test`** | Whether to enable testing. | **false** | **string** | `true` |
| | Set to `null` or empty to disable. | | | |
| | Accepts a JSON object for test options. See [test action](../actions/test/README.md). | | | |
| **`working-directory`** | Working directory where the dependencies are installed. | **false** | **string** | `.` |
| **`container`** | Docker container image to run CI steps in. When specified, steps will execute inside this container instead of checking out code. The container should have the project code and dependencies pre-installed. | **false** | **string** | - |

Expand All @@ -174,6 +180,13 @@ jobs:
<!-- secrets:end -->

<!-- outputs:start -->

## Outputs

| **Output** | **Description** |
| ----------------------- | --------------------------------------------------------- |
| **`build-artifact-id`** | ID of the build artifact) uploaded during the build step. |

<!-- outputs:end -->

<!-- examples:start -->
Expand All @@ -193,7 +206,7 @@ on:

jobs:
continuous-integration:
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@23af54bc615d657aa9c13c472ae701445c1811a6 # 0.17.1
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@32a69b7b8fd5f7ab7bf656e7e88aa90ad235cf8d # 0.18.0
permissions:
id-token: write
security-events: write
Expand Down Expand Up @@ -259,7 +272,7 @@ jobs:
# Run CI checks inside the Docker container
continuous-integration:
needs: build-image
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@23af54bc615d657aa9c13c472ae701445c1811a6 # 0.17.1
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@32a69b7b8fd5f7ab7bf656e7e88aa90ad235cf8d # 0.18.0
permissions:
id-token: write
security-events: write
Expand Down
36 changes: 18 additions & 18 deletions actions/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcGFja2FnZSIgY29sb3I9ImJsdWUiPjxsaW5lIHgxPSIxNi41IiB5MT0iOS40IiB4Mj0iNy41IiB5Mj0iNC4yMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMSAxNlY4YTIgMiAwIDAgMC0xLTEuNzNsLTctNGEyIDIgMCAwIDAtMiAwbC03IDRBMiAyIDAgMCAwIDMgOHY4YTIgMiAwIDAgMCAxIDEuNzNsNyA0YTIgMiAwIDAgMCAyIDBsNy00QTIgMiAwIDAgMCAyMSAxNnoiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSIzLjI3IDYuOTYgMTIgMTIuMDEgMjAuNzMgNi45NiI+PC9wb2x5bGluZT48bGluZSB4MT0iMTIiIHkxPSIyMi4wOCIgeDI9IjEyIiB5Mj0iMTIiPjwvbGluZT48L3N2Zz4=) GitHub Action: Build

<div align="center">
<img src="https://opengraph.githubassets.com/b83a39d0a270998cbae0974683a11eba4481aa44bbb4abbc39522474251c5b0a/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Build" />
<img src="https://opengraph.githubassets.com/50237226ce5d3230f19bbf31d04efd98f21cb2150e9ae4acd09a498440ecde82/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Build" />
</div>

---
Expand All @@ -30,7 +30,7 @@ Action to build Node.js projects with support for custom commands, environment v
## Usage

````yaml
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@dde8f0c67661ed66da8871a9fb104d36e146d644 # copilot/refactor-ci-actions-lint-test
- uses: hoverkraft-tech/ci-github-nodejs/actions/build@32a69b7b8fd5f7ab7bf656e7e88aa90ad235cf8d # 0.18.0
with:
# Working directory where the build commands are executed.
# Can be absolute or relative to the repository root.
Expand All @@ -53,8 +53,8 @@ Action to build Node.js projects with support for custom commands, environment v
# Multi-line string of secrets in env format (KEY=VALUE).
# Example:
# ```
# SECRET_KEY=${{ secrets.SECRET_KEY }}
# API_TOKEN=${{ secrets.API_TOKEN }}
# SECRET_KEY=$\{{ secrets.SECRET_KEY }}
# API_TOKEN=$\{{ secrets.API_TOKEN }}
# ```
build-secrets: ""

Expand All @@ -72,20 +72,20 @@ Action to build Node.js projects with support for custom commands, environment v

## Inputs

| **Input** | **Description** | **Required** | **Default** |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- |
| **`working-directory`** | Working directory where the build commands are executed. | **false** | `.` |
| | Can be absolute or relative to the repository root. | | |
| **`build-commands`** | List of build commands to execute, one per line. | **true** | - |
| | These are npm/pnpm/Yarn script names (e.g., "build", "compile"). | | |
| **`build-env`** | JSON object of environment variables to set during the build. | **false** | `\{}` |
| | Example: {"NODE_ENV": "production", "API_URL": "<https://api.example.com"}> | | |
| **`build-secrets`** | Multi-line string of secrets in env format (KEY=VALUE). | **false** | - |
| | Example: | | |
| | <!-- textlint-disable --><pre>SECRET_KEY=${{ secrets.SECRET_KEY }}&#13;API_TOKEN=${{ secrets.API_TOKEN }}</pre><!-- textlint-enable --> | | |
| **`build-artifact`** | JSON object specifying artifact upload configuration. | **false** | - |
| | Format: {"name": "artifact-name", "paths": "path1\npath2"} | | |
| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` |
| **Input** | **Description** | **Required** | **Default** |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- |
| **`working-directory`** | Working directory where the build commands are executed. | **false** | `.` |
| | Can be absolute or relative to the repository root. | | |
| **`build-commands`** | List of build commands to execute, one per line. | **true** | - |
| | These are npm/pnpm/yarn script names (e.g., "build", "compile"). | | |
| **`build-env`** | JSON object of environment variables to set during the build. | **false** | `\{}` |
| | Example: {"NODE_ENV": "production", "API_URL": "<https://api.example.com"}> | | |
| **`build-secrets`** | Multi-line string of secrets in env format (KEY=VALUE). | **false** | - |
| | Example: | | |
| | <!-- textlint-disable --><pre>SECRET_KEY=$\{{ secrets.SECRET_KEY }}&#13;API_TOKEN=$\{{ secrets.API_TOKEN }}</pre><!-- textlint-enable --> | | |
| **`build-artifact`** | JSON object specifying artifact upload configuration. | **false** | - |
| | Format: {"name": "artifact-name", "paths": "path1\npath2"} | | |
| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` |

<!-- inputs:end -->
<!-- secrets:start -->
Expand Down
8 changes: 4 additions & 4 deletions actions/dependencies-cache/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!-- header:start -->

# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYXJjaGl2ZSIgY29sb3I9ImdyYXktZGFyayI+PHBvbHlsaW5lIHBvaW50cz0iMjEgOCAyMSAyMSAzIDIxIDMgOCI+PC9wb2x5bGluZT48cmVjdCB4PSIxIiB5PSIzIiB3aWR0aD0iMjIiIGhlaWdodD0iNSI+PC9yZWN0PjxsaW5lIHgxPSIxMCIgeTE9IjEyIiB4Mj0iMTQiIHkyPSIxMiI+PC9saW5lPjwvc3ZnPg==) GitHub Action: Dependencies cache
# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYXJjaGl2ZSIgY29sb3I9ImJsdWUiPjxwb2x5bGluZSBwb2ludHM9IjIxIDggMjEgMjEgMyAyMSAzIDgiPjwvcG9seWxpbmU+PHJlY3QgeD0iMSIgeT0iMyIgd2lkdGg9IjIyIiBoZWlnaHQ9IjUiPjwvcmVjdD48bGluZSB4MT0iMTAiIHkxPSIxMiIgeDI9IjE0IiB5Mj0iMTIiPjwvbGluZT48L3N2Zz4=) GitHub Action: Dependencies cache

<div align="center">
<img src="https://opengraph.githubassets.com/5bff83a351121c577bee39e10ea7d6774aba5d0d7d7b114ba0e8b79d48d09267/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Dependencies cache" />
<img src="https://opengraph.githubassets.com/50237226ce5d3230f19bbf31d04efd98f21cb2150e9ae4acd09a498440ecde82/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Dependencies cache" />
</div>

---
Expand Down Expand Up @@ -33,7 +33,7 @@ Action to setup dependencies cache managment.
## Usage

```yaml
- uses: hoverkraft-tech/ci-github-nodejs/actions/dependencies-cache@23af54bc615d657aa9c13c472ae701445c1811a6 # 0.17.1
- uses: hoverkraft-tech/ci-github-nodejs/actions/dependencies-cache@32a69b7b8fd5f7ab7bf656e7e88aa90ad235cf8d # 0.18.0
with:
# List of dependencies for which the cache should be managed.
# This input is required.
Expand Down Expand Up @@ -92,7 +92,7 @@ This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2025 Hoverkraft
Copyright © 2025 hoverkraft

For more details, see the [license](http://choosealicense.com/licenses/mit/).

Expand Down
Loading