Skip to content

Add a Check Branch GH Action #3

Add a Check Branch GH Action

Add a Check Branch GH Action #3

Workflow file for this run

name: 'Check Branch'
on:
# Trigger the workflow on pull request,
# but only for the main branch
pull_request:
branches:
- main
jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'main' && github.head_ref != 'dev'
run: |
echo "Base branch: ${{ github.base_ref }}"
echo "Head branch: ${{ github.head_ref }}"
# run: |
# echo "ERROR: You can only merge changes into main from the dev branch."
# exit 1
# - name: Debugging Info