kafka

Форк
0
67 строк · 2.3 Кб
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: "Update Commit Status Check"
20
description: "Update the status of a commit check using the GH CLI"
21
inputs:
22
  # Composite actions do not support typed parameters. Everything is treated as a string
23
  # See: https://github.com/actions/runner/issues/2238
24
  gh-token:
25
    description: "The GitHub token for use with the CLI"
26
    required: true
27
  repository:
28
    description: "The GitHub repository"
29
    required: true
30
    default: "apache/kafka"
31
  commit_sha:
32
    description: "The SHA of the commit we are updating"
33
    required: true
34
  url:
35
    description: "The URL of the status check"
36
    required: false
37
    default: ""
38
  description:
39
    description: "The text to display next to the check"
40
    default: ""
41
    required: false
42
  context:
43
    description: "The name of the status check"
44
    required: true
45
  state:
46
    description: "The state of the check. Can be one of: error, failure, pending, success"
47
    required: true
48

49
runs:
50
  using: "composite"
51
  steps:
52
    - name: Update Check
53
      shell: bash
54
      env:
55
        GH_TOKEN: ${{ inputs.gh-token }}
56
        REPO: ${{ inputs.repository }}
57
        COMMIT_SHA: ${{ inputs.commit_sha }}
58
        STATE: ${{ inputs.state }}
59
        URL: ${{ inputs.url }}
60
        DESCRIPTION: ${{ inputs.description }}
61
        CONTEXT: ${{ inputs.context }}
62
      run: |
63
        gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
64
        /repos/$REPO/statuses/$COMMIT_SHA \
65
        -f "state=$STATE" -f "target_url=$URL" \
66
        -f "description=$DESCRIPTION" \
67
        -f "context=$CONTEXT"
68

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

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

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

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