Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkershner6/npm-version-check-with-comment-action
This is a composite action that checks out the pr and base branch, compares package.json versions, and comments on the PR whether there is a change or not
https://github.com/dkershner6/npm-version-check-with-comment-action
github-actions nodejs
Last synced: 29 days ago
JSON representation
This is a composite action that checks out the pr and base branch, compares package.json versions, and comments on the PR whether there is a change or not
- Host: GitHub
- URL: https://github.com/dkershner6/npm-version-check-with-comment-action
- Owner: dkershner6
- License: mit
- Created: 2021-08-26T14:32:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-09T22:32:10.000Z (almost 3 years ago)
- Last Synced: 2024-10-17T12:11:51.707Z (about 1 month ago)
- Topics: github-actions, nodejs
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npm-version-check-with-comment-action
This is a composite action that checks out the pr and base branch, compares package.json versions, and comments on the PR whether there is a change or not.
This can be ran more than once on the same PR.
## Usage
```yml
name: "PR to Main"
on:
pull_request:
branches:
- mainjobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: dkershner6/npm-version-check-with-comment-action@v1
id: version-check
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
node-version: "12.x" # optional, defaults to 14.x
working-directory: "/package1/folder1/" # optional, defaults to root
# Outputs whether or not it changed
- run: echo ${{ steps.version-check.outputs.version-did-change }}
# Optionally fail the workflow, should you choose
- name: Fail on no version updated
if: ${{ steps.version-check.outputs.version-did-change == 'false' }}
run: 'echo "No version change :/" && exit 1'
```