-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add nx run-many and deprecated actions
- Loading branch information
1 parent
23872ca
commit ea4f6f2
Showing
5 changed files
with
146 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Mark as deprecated' | ||
description: 'Mark something as deprecated' | ||
|
||
inputs: | ||
name: | ||
description: 'Name of the thing to mark as deprecated' | ||
required: true | ||
|
||
replacement: | ||
description: 'The replacement' | ||
required: false | ||
|
||
reason: | ||
description: 'The reason why it is deprecated' | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: 'Mark as deprecated' | ||
shell: bash | ||
#language=bash | ||
run: | | ||
msg="${{ inputs.name }} is deprecated and will be removed in the future." | ||
if [ -n "${{ inputs.replacement }}" ]; then | ||
msg="${msg} Use ${{ inputs.replacement }} instead." | ||
fi | ||
if [ -n "${{ inputs.reason }}" ]; then | ||
msg="${msg} Reason: ${{ inputs.reason }}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Cache Nx' | ||
description: 'Cache Nx build results' | ||
|
||
outputs: | ||
cache-hit: | ||
description: 'A boolean value to indicate an exact match was found for the primary key' | ||
value: ${{ steps.cache.outputs.cache-hit}} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: 'Cache Nx' | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: | | ||
node_modules/.cache/nx | ||
.nx | ||
key: ${{ runner.os }}-nx-cache-${{ hashFiles('nx.json', '**/project.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-nx-cache- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Run many nx actions' | ||
description: 'Run multiple actions in parallel' | ||
|
||
inputs: | ||
target: | ||
description: 'The target to run' | ||
required: true | ||
|
||
args: | ||
description: 'The arguments to pass to the target' | ||
required: false | ||
default: '' | ||
|
||
prefix: | ||
description: 'The prefix to use for the commands' | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: myparcelnl/actions/nx-cache@v4 | ||
|
||
- name: 'Run' | ||
shell: bash | ||
#language=bash | ||
run: | | ||
${{ inputs.prefix }} nx run-many \ | ||
--output-style=static \ | ||
--target="${{ inputs.target }}" \ | ||
${{ inputs.args }} |