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
56 changes: 32 additions & 24 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/18a765fa9c9c81cb07807356ca5cd6b7f081abeef5ae263581ba407bebfb6ac0/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Node.js Continuous Integration" />
<img src="https://opengraph.githubassets.com/e309cae9c17a1139fbcaed62e9536b80cf64fd9d2c43359c5c5c666666bea49c/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Node.js Continuous Integration" />
</div>

---
Expand Down Expand Up @@ -54,7 +54,7 @@ permissions:
id-token: write
jobs:
continuous-integration:
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@acb0215bd991fe9aa6e8309fe0612620f40186f8 # copilot/update-workflow-for-docker-image
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@4d7c1ed87c18493fc4c2dbae4dbde46cf251c9a7 # 0.16.1
secrets:
# Secrets to be used during the build step.
# Must be a multi-line env formatted string.
Expand All @@ -64,6 +64,12 @@ jobs:
# ```
build-secrets: ""
with:
# JSON array of runner(s) to use.
# See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job.
#
# Default: `["ubuntu-latest"]`
runs-on: '["ubuntu-latest"]'

# Build parameters. Must be a string or a JSON object.
# For string, provide a list of commands to run during the build step, one per line.
# For JSON object, provide the following properties:
Expand Down Expand Up @@ -132,26 +138,28 @@ jobs:

### Workflow Call Inputs

| **Input** | **Description** | **Required** | **Type** | **Default** |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | ------------ |
| **`build`** | Build parameters. Must be a string or a JSON object. | **false** | **string** | `build` |
| | For string, provide a list of commands to run during the build step, one per line. | | | |
| | For JSON object, provide the following properties: | | | |
| | | | | |
| | - `commands`: Array of commands to run during the build step. | | | |
| | - `env`: Object of environment variables to set during the build step. | | | |
| | - `artifact`: String or array of strings specifying paths to artifacts to upload after the build | | | |
| | | | | |
| | 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` |
| **`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` |
| **`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** | - |
| **Input** | **Description** | **Required** | **Type** | **Default** |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | ------------------- |
| **`runs-on`** | JSON array of runner(s) to use. | **false** | **string** | `["ubuntu-latest"]` |
| | See <https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job>. | | | |
| **`build`** | Build parameters. Must be a string or a JSON object. | **false** | **string** | `build` |
| | For string, provide a list of commands to run during the build step, one per line. | | | |
| | For JSON object, provide the following properties: | | | |
| | | | | |
| | - `commands`: Array of commands to run during the build step. | | | |
| | - `env`: Object of environment variables to set during the build step. | | | |
| | - `artifact`: String or array of strings specifying paths to artifacts to upload after the build | | | |
| | | | | |
| | 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` |
| **`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` |
| **`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** | - |

<!-- inputs:end -->

Expand Down Expand Up @@ -188,7 +196,7 @@ on:

jobs:
continuous-integration:
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@acb0215bd991fe9aa6e8309fe0612620f40186f8 # copilot/update-workflow-for-docker-image
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@4d7c1ed87c18493fc4c2dbae4dbde46cf251c9a7 # 0.16.1
permissions:
id-token: write
security-events: write
Expand Down Expand Up @@ -254,7 +262,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@acb0215bd991fe9aa6e8309fe0612620f40186f8 # copilot/update-workflow-for-docker-image
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@4d7c1ed87c18493fc4c2dbae4dbde46cf251c9a7 # 0.16.1
permissions:
id-token: write
security-events: write
Expand Down
2 changes: 1 addition & 1 deletion actions/get-package-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcGFja2FnZSIgY29sb3I9ImdyYXktZGFyayI+PGxpbmUgeDE9IjE2LjUiIHkxPSI5LjQiIHgyPSI3LjUiIHkyPSI0LjIxIj48L2xpbmU+PHBhdGggZD0iTTIxIDE2VjhhMiAyIDAgMCAwLTEtMS43M2wtNy00YTIgMiAwIDAgMC0yIDBsLTcgNEEyIDIgMCAwIDAgMyA4djhhMiAyIDAgMCAwIDEgMS43M2w3IDRhMiAyIDAgMCAwIDIgMGw3LTRBMiAyIDAgMCAwIDIxIDE2eiI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjMuMjcgNi45NiAxMiAxMi4wMSAyMC43MyA2Ljk2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjIyLjA4IiB4Mj0iMTIiIHkyPSIxMiI+PC9saW5lPjwvc3ZnPg==) GitHub Action: Get package manager

<div align="center">
<img src="https://opengraph.githubassets.com/0117dcf638f02d4da90af545ea1cae44cc8215860dbd273d47e78d65b56a6cfa/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Get package manager" />
<img src="https://opengraph.githubassets.com/e309cae9c17a1139fbcaed62e9536b80cf64fd9d2c43359c5c5c666666bea49c/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Get package manager" />
</div>

---
Expand Down