Skip to content

Commit

Permalink
fix: shutdown agents after running parallel commands (#90)
Browse files Browse the repository at this point in the history
* fix: shutdown agents after running parallel commands

* chore: bump version

---------

Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
  • Loading branch information
AgentEnder and meeroslav committed Nov 17, 2023
1 parent b65f0cb commit 76feeb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/nx-cloud-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,18 @@ jobs:
# We need to escape the workspace path to be consistent cross-platform: https://github.com/actions/runner/issues/1066
run: ${GITHUB_WORKSPACE//\\//}/.github/workflows/run-commands-in-parallel.sh '${{ steps.parallel_commands_config.outputs.result }}'

- name: Stop all running agents for this CI run
# It's important that we always run this step, otherwise in the case of any failures in preceding non-Nx steps, the agents will keep running and waste billable minutes
if: ${{ always() }}
run: npx nx-cloud stop-all-agents

# The good thing about the multi-line string input for sequential commands is that we can simply forward it on as is to the bash shell and it will behave
# how we want it to in terms of quote escaping, variable assignment etc
- name: Run any configured final-commands sequentially
if: ${{ inputs.final-commands != '' }}
run: |
${{ inputs.final-commands }}
- name: Stop all running agents for this CI run
# It's important that we always run this step, otherwise in the case of any failures in preceding non-Nx steps, the agents will keep running and waste billable minutes
if: ${{ always() }}
run: npx nx-cloud stop-all-agents

- name: Uploading artifacts
uses: actions/upload-artifact@v3
if: ${{ inputs.artifacts-path != '' }}
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.13.2",
"version": "0.13.3",
"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 76feeb7

Please sign in to comment.