Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/radcortez/project-version-action
https://github.com/radcortez/project-version-action
Last synced: about 20 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/radcortez/project-version-action
- Owner: radcortez
- Created: 2020-02-28T22:59:31.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T04:34:42.000Z (over 1 year ago)
- Last Synced: 2024-10-28T15:25:02.259Z (about 2 months ago)
- Language: JavaScript
- Size: 907 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Version action
This is an opinated way to retrieve the Project Version of a Repository. The purpose of this action is to expose the
project version as a context variable to be used across your Github Action Workflow.It looks for a specific file in your Pull Request and retrieves the version from it. The file must only contain the
version and nothing more.This action is only intended to run with Pull Request events.
## Inputs
### `github-token`
**Required** The GitHub Token used to create an authenticated client. The Github Token is already set by the Github
Action itself. Use this if you want to pass in your own Personal Access Token.**Default** `${{github.token}}`.
### `version-file-path`
**Required** The path to the file that contains the Project version.
## Outputs
### `project-version`
The Project Version. Read from the input file path.
## Example usage
```yaml
- uses: radcortez/project-version-action@master
name: retrieve project version
id: version
with:
github-token: ${{secrets.GITHUB_TOKEN}}
version-file-path: '.github/release/version'
```After this step, you can reference the Project Version with `${{steps.version.outputs.project-version}}`.