Skip to content

[task_01] Add solution #4

[task_01] Add solution

[task_01] Add solution #4

name: Check branch name
on:
push:
branches:
- main
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Get branch names
id: branch-name
uses: tj-actions/branch-names@v7
- name: Current branch name
if: ${{steps.branch-name.outputs.current_branch == 'main' || steps.branch-name.outputs.current_branch == 'master' }}
uses: actions/github-script@v3
with:
script: |
core.setFailed('Branch should not be main')