Skip to content

Commit 756cc21

Browse files
authored
fix: update readme with usage instructions (#186)
docs(pm-detect): update readme with usage instructions
1 parent 428421c commit 756cc21

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

package-manager-detect/README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,19 @@ This workflow outputs the following information / commands for the node package
2727

2828
## Usage
2929

30-
- Add a workflow to your Github repository as in the example below.
30+
Add the following to your workflow after checkout and before nodejs setup. Make sure to supply an id so you can reference the output later.
31+
32+
```yaml
33+
- uses: grafana/plugin-actions/package-manager-detect@package-manager-detect/v1.0.0
34+
- id: packageManager
35+
```
36+
37+
After this you can reference the various package manager commands like so:
38+
39+
```yaml
40+
- name: Install dependencies
41+
run: ${{ steps.packageManager.outputs.frozenInstallCmd }}
42+
```
3143
3244
## Workflow example
3345
@@ -78,4 +90,4 @@ jobs:
7890
7991
The following options can be passed to this action:
8092
81-
- `working-directory`: The working directory to run the action in.
93+
- `working-directory` (optional): The working directory to run the action in. Defaults to `.`.

0 commit comments

Comments
 (0)