Skip to content

Commit

Permalink
fix: lookup pnpm store path (#51)
Browse files Browse the repository at this point in the history
* fix: lookup pnpm store path

* build: bump package version

Co-authored-by: James Henry <[email protected]>
  • Loading branch information
cyrixmorten and JamesHenry authored Jan 4, 2023
1 parent 57e3ef5 commit e00f83b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/nx-cloud-agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,16 @@ jobs:
restore-keys: |
${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-
- name: Get pnpm cache directory path
if: steps.package_manager.outputs.name == 'pnpm'
id: pnpm-cache-dir-path
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Use the node_modules cache if available [pnpm]
if: steps.package_manager.outputs.name == 'pnpm'
uses: actions/cache@v3
with:
path: ~/.pnpm-store
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/nx-cloud-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,16 @@ jobs:
restore-keys: |
${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-
- name: Get pnpm cache directory path
if: steps.package_manager.outputs.name == 'pnpm'
id: pnpm-cache-dir-path
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Use the node_modules cache if available [pnpm]
if: steps.package_manager.outputs.name == 'pnpm'
uses: actions/cache@v3
with:
path: ~/.pnpm-store
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.versions.outputs.node_version }}-
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ concurrency:
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected].1
uses: nrwl/ci/.github/workflows/[email protected].2
with:
# NOTE: Here we are using the special `nx-cloud record` command to ensure that any commands we run that do not go through the cloud task runner natively
# (i.e. anything that starts with `nx run`/`nx run-many`/`nx affected --target`), are still captured in the Nx Cloud UI and Github App comment for
Expand All @@ -75,7 +75,7 @@ jobs:
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected].1
uses: nrwl/ci/.github/workflows/[email protected].2
with:
number-of-agents: 3
```
Expand Down Expand Up @@ -110,15 +110,15 @@ concurrency:
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected].1
uses: nrwl/ci/.github/workflows/[email protected].2
secrets:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
with: ...
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected].1
uses: nrwl/ci/.github/workflows/[email protected].2
secrets:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
Expand All @@ -134,7 +134,7 @@ See the annotated configuration below for all explicitly supported secret values
<!-- start configuration-options-for-the-main-job -->

```yaml
- uses: nrwl/ci/.github/workflows/[email protected].1
- uses: nrwl/ci/.github/workflows/[email protected].2
# [OPTIONAL] Explicitly supported secret values which can be passed into the workflow from your outer workflow run.
#
# NOTE: You cannot access values from ${{ secrets }} beyond what is explicitly specified here because of the limitations of reusable Github workflows
Expand Down Expand Up @@ -249,7 +249,7 @@ See the annotated configuration below for all explicitly supported secret values
<!-- start configuration-options-for-agent-jobs -->
```yaml
- uses: nrwl/ci/.github/workflows/[email protected].1
- uses: nrwl/ci/.github/workflows/[email protected].2
# [OPTIONAL] Explicitly supported secret values which can be passed into the workflow from your outer workflow run.
#
# NOTE: You cannot access values from ${{ secrets }} beyond what is explicitly specified here because of the limitations of reusable Github workflows
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.11.1",
"version": "0.11.2",
"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 e00f83b

Please sign in to comment.