Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkershner6/node-workspace-detector-action
GitHub Action to automatically detect the parent-most directory that contains a Node or NPM Project, and return the result in outputs.
https://github.com/dkershner6/node-workspace-detector-action
Last synced: 29 days ago
JSON representation
GitHub Action to automatically detect the parent-most directory that contains a Node or NPM Project, and return the result in outputs.
- Host: GitHub
- URL: https://github.com/dkershner6/node-workspace-detector-action
- Owner: dkershner6
- License: apache-2.0
- Created: 2020-07-30T20:46:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-14T00:10:33.000Z (7 months ago)
- Last Synced: 2024-04-14T01:12:54.355Z (7 months ago)
- Language: TypeScript
- Size: 876 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node / NPM Workspace Detector GitHub Action
GitHub Action to automatically detect the parent-most directory that contains a Node or NPM Project, and return the result in outputs.
Uses [find-package-json](https://www.npmjs.com/package/find-package-json)
## Usage
### Inputs
None
### Outputs
| key | default | description |
|-----|---------|-------------|
| workspace | N/A | The parent-most path where a package.json exists |### Example Workflow
```yaml
on: pull_requestjobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2- name: Find Node Workspace
id: node-workspace
uses: dkershner6/node-workspace-detector-action@v2- name: Use NPM Token with organization read access
uses: dkershner6/use-npm-token-action@v2
with:
token: "${{ secrets.NPMJS_READ }}"
workspace: ${{ steps.node-workspace.outputs.workspace }}
```## Contributing
All contributions are welcome, please open an issue or pull request.
To use this repository:
1. `npm i -g pnpm` (if don't have pnpm installed)
2. `pnpm i`
3. `npx projen` (this will ensure everything is setup correctly, and you can run this command at any time)
4. Good to make your changes!
5. You can run `npx projen build` at any time to build the project.