kafka

Форк
0
55 строк · 1.9 Кб
1
# Licensed to the Apache Software Foundation (ASF) under one
2
# or more contributor license agreements.  See the NOTICE file
3
# distributed with this work for additional information
4
# regarding copyright ownership.  The ASF licenses this file
5
# to you under the Apache License, Version 2.0 (the
6
# "License"); you may not use this file except in compliance
7
# with the License.  You may obtain a copy of the License at
8
#
9
#   http://www.apache.org/licenses/LICENSE-2.0
10
#
11
# Unless required by applicable law or agreed to in writing,
12
# software distributed under the License is distributed on an
13
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
# KIND, either express or implied.  See the License for the
15
# specific language governing permissions and limitations
16
# under the License.
17
#
18
---
19
name: "Approve Workflow Run"
20
description: "Approve a Workflow run that has been submitted by a non-committer"
21
inputs:
22
  gh-token:
23
    description: "The GitHub token for use with the CLI"
24
    required: true
25
  repository:
26
    description: "The GitHub repository"
27
    required: true
28
    default: "apache/kafka"
29
  run_id:
30
    description: "The Workflow Run ID"
31
    required: true
32
  pr_number:
33
    description: "The Pull Request number"
34
    required: true
35
  commit_sha:
36
    description: "The SHA of the commit the run is for"
37
    required: true
38

39
runs:
40
  using: "composite"
41
  steps:
42
    - name: Approve Workflow Run
43
      shell: bash
44
      env:
45
        GH_TOKEN: ${{ inputs.gh-token }}
46
        REPO: ${{ inputs.repository }}
47
        RUN_ID: ${{ inputs.run_id }}
48
        PR_NUMBER: ${{ inputs.pr_number }}
49
        COMMIT_SHA: ${{ inputs.commit_sha }}
50
      run: |
51
        echo "Approving workflow run $RUN_ID for PR $PR_NUMBER at SHA $COMMIT_SHA";
52
        gh api --method POST \
53
              -H 'Accept: application/vnd.github+json' \
54
              -H 'X-GitHub-Api-Version: 2022-11-28' \
55
              /repos/$REPO/actions/runs/$RUN_ID/approve
56

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

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

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

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