-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
141 lines (130 loc) · 4.12 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright 2024 Buf Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Buf Action"
author: "Buf"
description: |-
Run build, lint, format, and breaking change checks on Protobuf files, and publish schemas to the Buf Schema Registry.
branding:
icon: play
color: blue
inputs:
version:
description: |-
Version of the Buf CLI to use.
Example:
with:
version: 1.35.0
required: false
token:
description: |-
API token for logging into the BSR.
required: false
domain:
description: |-
Domain for logging into the BSR, enterprise only.
required: false
default: "buf.build"
github_actor:
description: |-
GitHub actor for API requests.
required: false
default: ${{ github.actor }}
github_token:
description: |-
GitHub token for API requests.
required: false
default: ${{ github.token }}
setup_only:
description: |-
Setup only the buf environment, optionally logging into the BSR, but without executing other commands.
required: false
default: "false"
pr_comment:
description: |-
Comment on the pull request with the results of each step. The workflow and job name combination must be unique.
Only runs on pull requests, for non forked repositories.
required: false
default: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
input:
description: |-
Input for the buf command.
required: false
paths:
description: |-
Limit to specific files or directories (separated by newlines).
Example:
with:
paths: |
proto/a/a.proto
proto/a
required: false
exclude_paths:
description: |-
Exclude specific files or directories (separated by newlines).
Example:
with:
exclude_paths: |
proto/a/a.proto
proto/a
required: false
exclude_imports:
description: |-
Exclude files imported by the target modules.
required: false
default: "false"
lint:
description: |-
Whether to run the linting step.
Runs by default on pull requests.
required: false
default: ${{ github.event_name == 'pull_request' }}
format:
description: |-
Whether to run the formatting step.
Runs by default on pull requests.
required: false
default: ${{ github.event_name == 'pull_request' }}
breaking:
description: |-
Whether to run the breaking change detection step.
Runs by default on pull requests if the "buf skip breaking" label is not applied.
required: false
default: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'buf skip breaking') }}
breaking_against:
description: |-
Input to compare against for breaking change detection.
Defaults to the base branch of the pull request or the commit before the push.
required: false
push:
description: |-
Whether to run the push step. Runs by default on pushes, for non forked repositories.
required: false
default: ${{ github.event_name == 'push' }}
push_disable_create:
description: |-
Disables repository creation if it does not exist. Defaults to false.
required: false
default: "false"
archive:
description: |-
Whether to run the archive step. Runs by default on deletes, for non forked repositories.
required: false
default: ${{ github.event_name == 'delete' }}
outputs:
buf_version:
description: |-
Version of the Buf CLI used.
runs:
using: "node20"
main: "./dist/index.js"