Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowed #12

Closed
wants to merge 12 commits into from
36 changes: 36 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
pull_request:
branches: ["develop"]

jobs:
check_is_valid_branch:
runs-on: ubuntu-latest
steps:
- name: Check if branch name is valid
if: ${{ !contains(github.head_ref,'merge-dev') }}
run: |
echo github.ref ${{ github.ref }}
echo github.ref.name ${{ github.ref.name }}
echo github.head_ref ${{ github.head_ref }}
echo github.base_ref ${{ github.base_ref }}
echo github.workflow_ref ${{ github.workflow_ref }}
echo "This branch is not valid to merge develeop. Only branches with 'merge-dev' are allowed to merge to develop."
exit 1

# name: test

# on: push

# jobs:
# check_is_valid_branch:
# runs-on: ubuntu-latest
# steps:
# - name: Check if branch name is valid
# if: ${{ !contains(github.ref,'merge-dev') }}
# run: |
# echo ${{ github.ref }}
# echo ${{ !contains(github.ref,'merge-dev') }}
# echo "This branch is not valid to merge develeop"
# exit 1
Loading