Skip to content

v1.0.1

v1.0.1 #14

Workflow file for this run

name: PR to Main Validation
on:
pull_request:
branches: [main]
jobs:
validate-source-branch:
name: Validate source branch
runs-on: ubuntu-latest
steps:
- name: Check source branch
run: |
echo "PR: ${{ github.head_ref }} -> ${{ github.base_ref }}"
if [ "${{ github.head_ref }}" != "develop" ]; then
echo ""
echo "=============================================="
echo "ERROR: Only 'develop' can be merged into 'main'"
echo "=============================================="
echo ""
echo "Source branch: ${{ github.head_ref }}"
echo "Target branch: ${{ github.base_ref }}"
echo ""
echo "Please create a PR from 'develop' to 'main' instead."
echo ""
exit 1
fi
echo ""
echo "=============================================="
echo "OK: PR from 'develop' to 'main' is valid"
echo "=============================================="