Skip to content

Commit

Permalink
feat(main): add NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT support (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Jun 23, 2022
1 parent 0b08f12 commit 6a26b69
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/nx-cloud-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Nx Cloud Main
on:
workflow_call:
inputs:
number-of-agents:
required: false
type: number
init-commands:
required: false
type: string
Expand Down Expand Up @@ -42,6 +45,7 @@ on:

env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: ${{ inputs.number-of-agents }}
NX_BRANCH: ${{ github.event.number || github.ref_name }}

jobs:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ jobs:
```yaml
- uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.3
with:
# [OPTIONAL] The available number of agents used by the Nx Cloud to distribute tasks in parallel.
# By default, NxCloud tries to infer dynamically how many agents you have available. Some agents
# can have delayed start leading to incorrect count when distributing tasks.
#
# If you know exactly how many agents you have available, it is recommended to set this so we can more
# reliably distribute the tasks.
number-of-agents: 3

# [OPTIONAL] A multi-line string representing any bash commands (separated by new lines) which should
# run sequentially, directly on the main job BEFORE executing any of the parallel commands which
# may be specified via parallel-commands and/or parallel-commands-on-agents
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"private": true,
"version": "0.4.0",
"version": "0.5.0",
"description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action"
}

0 comments on commit 6a26b69

Please sign in to comment.