Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romeovs/tool-versions-action
Read version from a .tool-versions file
https://github.com/romeovs/tool-versions-action
Last synced: 24 days ago
JSON representation
Read version from a .tool-versions file
- Host: GitHub
- URL: https://github.com/romeovs/tool-versions-action
- Owner: romeovs
- License: mit
- Created: 2024-01-27T14:56:08.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-27T15:49:30.000Z (10 months ago)
- Last Synced: 2024-04-17T01:45:44.861Z (7 months ago)
- Language: TypeScript
- Size: 240 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @romeovs/tool-versions-action
## Usage
Add a step to you workflow to read the versions from `.tool-versions`:
```yaml
- name: Read .tool-versions
uses: romeovs/tool-versions-action@v3
id: versions
```Then, use the outputs of that step, for example:
```yaml
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: ${{ steps.versions.outputs.pnpm }}
```### Inputs
- `path`: path of the `.tool-versions` file, defaults to `.tool-versions`
### Outputs
This action creates one output per entry in the `.tool-versions` file, containing
the version.## Example workflow
```yaml
name: Get version info
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Read .tool-versions
uses: romeovs/tool-versions-action@v3
id: versions
- uses: pnpm/action-setup@v2
name: Install pnpm ${{ steps.versions.outputs.pnpm }}
with:
version: ${{ steps.versions.outputs.pnpm }}
- name: Use Node.js ${{ steps.versions.outputs.nodejs}}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodejs}}
```## License
The scripts and documentation in this project are released under the MIT License.