CICD_examples
Форк от gitverse_tutorials/CICD_examples
20 строк · 657.0 Байт
1name: Демонстрация защиты ветки
2on:
3pull_request:
4jobs:
5build-test:
6name: CICD branch protection
7runs-on: ubuntu-latest
8steps:
9- name: Display pull request title
10run: echo ${{ github.event.pull_request.title }}
11- name: Display commit message
12run: echo ${{ github.event.head_commit.message }}
13- name: Check pull request title
14run: |
15if [[ "${{ github.event.pull_request.title }}" == *"TASK-"* ]]; then
16echo "Pull request title contains 'TASK-'"
17else
18echo "Pull request title does not contain 'TASK-'"
19exit 1
20fi
21