Skip to content

release branch: change workflow #15

release branch: change workflow

release branch: change workflow #15

Workflow file for this run

name: Block 'Merge branch develop' commits
on:
push:
branches:
- 'release/**'
jobs:
block_merge_commits:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Validate Merge Direction
shell: bash
run: |
echo "Merging ${{ github.head_ref }} -> ${{ github.base_ref }}"
if [[ "${{github.head_ref}}" == "develop" ]] && \
[[ "${{github.base_ref}}" == "release/**" ]]
then
ACCEPTABLE=false
fi
if [[ $ACCEPTABLE == "true" ]]
then
echo "You're okay to merge!"
else
echo "::error ::You cannot merge '${{github.head_ref}}' -> '${{github.base_ref}}'."
exit 1;
fi