Skip to content
play

GitHub Action

Enforce specific targeting branch

v1.0 Latest version

Enforce specific targeting branch

play

Enforce specific targeting branch

Fails workflow when the event branch is not the one specified

Installation

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

              

- name: Enforce specific targeting branch

uses: jakejcheng/[email protected]

Learn more about this action in jakejcheng/actions-verify-event-branch

Choose a version

actions-verify-event-branch

A Github Action that will fail the workflow on push/pull_request when the event branch is not the one specified.

Inputs

targeting-branch

Required The names of branches to allow action on or fail otherwise. Default "test".

targeting-type

Required The type of event to trigger the action on. Must be either "push" or "pull_request". Default "pull_request".

Example usage

uses: actions/actions-verify-event-branch@[commit hash/release]
with:
  targeting-branch: develop,test
  targeting-type: pull_request