Skip to content
alert-triangle

GitHub Action

PR Version Check

v0.1.1 Latest version

PR Version Check

alert-triangle

PR Version Check

Checks if a version line in a given file has changed in this branch against master

Installation

Copy and paste the following snippet into your .yml file.

              

- name: PR Version Check

uses: rpiambulance/[email protected]

Learn more about this action in rpiambulance/action-pr-version-check

Choose a version

PR Version Check Github Action

Checks if the version field in a given JSON file has been incremented compared to master. Principally for checking on PRs to be merged into master.

Usage:

name: "Check for version update in PR to Master"

on:
  pull_request:
    # Sequence of patterns matched against refs/heads
    branches:    
    - master

jobs:
  master-pr-check-version:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Check if version changed
      uses: rpiambulance/action-pr-version-check
      with:
        file: package.json # optional, defaults to "package.json"