Skip to content

Commit 94f9892

Browse files
author
e-square-ci
committed
build: change ncc libs to node apps
1 parent c93aa23 commit 94f9892

File tree

6 files changed

+46534
-44543
lines changed

6 files changed

+46534
-44543
lines changed

.gitkeep

Whitespace-only changes.

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# @e-square/nx-distributed-task
1+
# @e-square/nx-distributed-task-lib
22

3-
[![NPM](https://img.shields.io/github/package-json/v/e-square-io/nx-distributed-task?&logo=npm&style=flat-square)]()
3+
[![NPM](https://img.shields.io/github/package-json/v/e-square-io/nx-distributed-task-lib?&logo=npm&style=flat-square)]()
44
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/e-square-io/nx-github-actions/Main%20Workflow?style=flat-square)](https://github.com/e-square-io/nx-github-actions/actions/workflows/main.yml)
55
[![Codecov](https://img.shields.io/codecov/c/github/e-square-io/nx-github-actions?logo=codecov&style=flat-square&token=PVPVUJAD1X)](https://app.codecov.io/gh/e-square-io/nx-github-actions)
66
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](https://github.com/e-square-io/nx-github-actions#contributors-)
77
[![MIT](https://img.shields.io/packagist/l/doctrine/orm.svg?style=flat-square)](https://github.com/e-square-io/nx-github-actions/blob/main/LICENSE)
88

99
## Summary
10+
1011
Github Action that runs nx `run-many` for the specified target and projects.
1112
This action was designed to consume the outputs of [@e-square/nx-affected-matrix](https://github.com/marketplace/actions/nx-affected-task) in order to distribute jobs with ease.
1213

@@ -15,16 +16,17 @@ Check out the monorepo's [README](https://github.com/e-square-io/nx-github-actio
1516
## Usage
1617

1718
### Inputs
18-
| name | description | default | required |
19-
|:-------|:-------|:-------:|:-------:|
20-
| target | Target to run | - | ✓ |
21-
| projects | Comma-delimited list of projects to run against target | - | ✓ |
22-
| distribution | Current distribution run, required when running in a matrix | - | ✗ |
23-
| maxParallel | Maximum NX cli parallel runs | 3 | ✗ |
24-
| nxCloud | Enable support of Nx Cloud | false | ✗ |
25-
| uploadOutputs | Upload target's outputs as workflow artifacts | true | ✗ |
26-
| workingDirectory | Path to the Nx workspace, needed if not the repository root | - | ✗ |
27-
| args | Space-delimited args to add to nx command execution | - | ✗ |
19+
20+
| name | description | default | required |
21+
| :--------------- | :---------------------------------------------------------- | :-----: | :------: |
22+
| target | Target to run | - | ✓ |
23+
| projects | Comma-delimited list of projects to run against target | - | ✓ |
24+
| distribution | Current distribution run, required when running in a matrix | - | ✗ |
25+
| maxParallel | Maximum NX cli parallel runs | 3 | ✗ |
26+
| nxCloud | Enable support of Nx Cloud | false | ✗ |
27+
| uploadOutputs | Upload target's outputs as workflow artifacts | true | ✗ |
28+
| workingDirectory | Path to the Nx workspace, needed if not the repository root | - | ✗ |
29+
| args | Space-delimited args to add to nx command execution | - | ✗ |
2830

2931
```yaml
3032
jobs:
@@ -34,17 +36,18 @@ jobs:
3436
steps:
3537
- name: Checkout
3638
uses: actions/checkout@v2
37-
39+
3840
# install node modules, cache etc
3941

4042
- name: Run command
41-
uses: e-square-io/nx-distributed-task@v2
43+
uses: e-square-io/nx-distributed-task-lib@v2
4244
with:
4345
target: 'test'
4446
projects: 'project1,project2'
4547
```
4648
4749
### Uploading outputs
50+
4851
In Github, when uploading multiple artifact under the same name, Github will keep adding the artifacts instead of overwriting them.
4952
This behavior allows us to upload all the outputs from all the distributed jobs under one "directory" so that in later jobs you can download that single "directory" and get all the outputs for that target.
5053
The name of the artifact will be the name of the target.

action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ name: 'Nx distributed task'
22
branding:
33
icon: chevron-right
44
color: white
5-
description: "Executes Nx task"
5+
description: 'Executes Nx task'
66
inputs:
77
target:
8-
description: "Target to run"
8+
description: 'Target to run'
99
required: true
1010
projects:
11-
description: "Comma-delimited list of projects to run against target"
11+
description: 'Comma-delimited list of projects to run against target'
1212
required: false
1313
default: ''
1414
distribution:
15-
description: "Current distribution run, required when running in a matrix"
15+
description: 'Current distribution run, required when running in a matrix'
1616
required: false
1717
bucket:
18-
description: "Current distribution run, required when running in a matrix"
18+
description: 'Current distribution run, required when running in a matrix'
1919
required: false
20-
deprecationMessage: "deprecated, use distribution input instead"
20+
deprecationMessage: 'deprecated, use distribution input instead'
2121
maxParallel:
22-
description: "Maximum NX cli parallel runs"
22+
description: 'Maximum NX cli parallel runs'
2323
required: false
2424
default: '3'
2525
uploadOutputs:
@@ -34,13 +34,13 @@ inputs:
3434
required: false
3535
default: 'false'
3636
workingDirectory:
37-
description: "Path to the Nx workspace, needed if not the repository root"
37+
description: 'Path to the Nx workspace, needed if not the repository root'
3838
required: false
3939
debug:
40-
description: "Enable Debug mode. Will not execute the target"
40+
description: 'Enable Debug mode. Will not execute the target'
4141
required: false
4242
default: 'false'
4343
runs:
4444
using: 'node16'
45-
main: 'index.js'
46-
post: 'index.js'
45+
main: 'main.js'
46+
post: 'main.js'

0 commit comments

Comments
 (0)