-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
128 lines (112 loc) · 3.89 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
name: 'ZyAction: .NET Format'
author: Florian Bernd
description: A GitHub Action that wraps the .NET CLI `dotnet format` command.
branding:
icon: terminal
color: blue
inputs:
working-directory:
description: >
The working-directory for the action.
Defaults to the repository root directory (`github.workspace`).
If a specific .NET SDK version is to be used, the working directory must point to the
directory that contains the `global.json` or a subdirectory of it.
type: string
required: false
default: ${{ github.workspace }}
workspace:
description: >
The Visual Studio workspace (directory, project- or solution-file).
This path is relative to the `working-directory` unless an absolute path is used.
type: string
required: false
default: ''
diagnostics:
description: >
A newline-separated list of diagnostic IDs to use as a filter when fixing code style or
third-party issues. Supports multiline strings.
Default value is whichever IDs are listed in the `.editorconfig` file.
type: string
required: false
default: ''
severity:
description: >
The minimum severity of diagnostics to fix.
Possible values:
- info
- warn
- error
The default value is `warn`.
type: string
required: false
default: ''
verify-no-changes:
description: >
Verifies that no formatting changes would be performed.
Terminates with a non zero exit code if any files would have been formatted.
type: boolean
required: false
default: false
include:
description: >
A newline-separated list of relative file or folder paths to include in formatting.
The default is all files in the solution or project.
Use `-` to read the list of files from the `pipe` input.
type: string
required: false
default: ''
exclude:
description: >
A newline-separated list of relative file or folder paths to exclude from formatting.
The default is none.
Use `-` to read the list of files from the `pipe` input.
type: string
required: false
default: ''
report-path:
description: Produces a JSON report in the specified directory.
type: string
required: false
default: ''
implicit-restore:
description: Execute an implicit restore before formatting.
type: boolean
required: false
default: false
use-standalone-tool:
description: >
Uses the standalone version of the `dotnet-format` tool instead of the version bundled
with the .NET SDK.
type: boolean
required: false
default: false
pipe:
description: >
An optional pipe input from which the `include` or `exclude` filenames are to be read.
This must be set to a valid shell command line (bash) that can be used for piping. The
command must output to `stdout` and separate the individual filenames by line breaks.
WARNING:
The command passed to this input will be evaluated and should not come from untrusted
sources.
type: string
required: false
default: ''
runs:
using: composite
steps:
- name: .NET Format
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
INPUT_WORKSPACE: ${{ inputs.workspace }}
INPUT_DIAGNOSTICS: ${{ inputs.diagnostics }}
INPUT_SEVERITY: ${{ inputs.severity }}
INPUT_VERIFY_NO_CHANGES: ${{ inputs.verify-no-changes != 'false' && 'true' || 'false' }}
INPUT_INCLUDE: ${{ inputs.include }}
INPUT_EXCLUDE: ${{ inputs.exclude }}
INPUT_REPORT_PATH: ${{ inputs.report-path }}
INPUT_IMPLICIT_RESTORE: ${{ inputs.implicit-restore != 'false' && 'true' || 'false' }}
INPUT_USE_STANDALONE_TOOL: ${{ inputs.use-standalone-tool != 'false' && 'true' || 'false' }}
INPUT_PIPE: ${{ inputs.pipe }}
run: |
"$GITHUB_ACTION_PATH/entrypoint.sh"