introduction-to-github

Форк
0
/
1-create-a-branch.yml 
38 строк · 859.0 Байт
1
name: Step 1, Create a branch
2

3
on:
4
  workflow_dispatch:
5
  create:
6

7
permissions:
8
  contents: write
9

10
jobs:
11
  get_current_step:
12
    name: Check current step number
13
    runs-on: ubuntu-latest
14
    steps:
15
      - name: Checkout
16
        uses: actions/checkout@v3
17
      - id: get_step
18
        run: |
19
          echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
20
    outputs:
21
      current_step: ${{ steps.get_step.outputs.current_step }}
22

23
  on_create_a_branch:
24
    name: On create a branch
25
    needs: get_current_step
26

27
    if: >-
28
      ${{ needs.get_current_step.outputs.current_step == 1
29
          && github.ref_type == 'branch'
30
          && github.ref_name == 'my-first-branch' }}
31

32
    runs-on: ubuntu-latest
33

34
    steps:
35
      - name: Checkout
36
        uses: actions/checkout@v3
37
        with:
38
          fetch-depth: 0 # Let's get all the branches.

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.