-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
73 lines (66 loc) · 2.1 KB
/
Copy pathaction.yml
File metadata and controls
73 lines (66 loc) · 2.1 KB
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
name: rubyfmt-action
description: Check Ruby formatting with rubyfmt
branding:
icon: "check-circle"
color: "red"
outputs:
outcome:
description: |
Either 'success' (all files are formatted) or 'failure' (rubyfmt found
unformatted files or an error occurred).
value: ${{ steps.run-rubyfmt.outputs.outcome }}
inputs:
paths:
description: |
The paths to pass to `rubyfmt --check`.
This should be a whitespace-separated list of files and/or directories.
Inputs will be split with shell splitting rules.
required: false
default: "."
version:
description: |
The version of `rubyfmt` to use.
This can be 'latest' (default) or an exact version, e.g. '0.14.2-10'
(with or without a leading 'v').
required: false
default: "latest"
fail-fast:
description: |
Whether `rubyfmt` should fail immediately on syntax/IO errors, instead
of warning and continuing.
required: false
default: "false"
include-gitignored:
description: |
Whether to also check files that are excluded by `.gitignore`.
required: false
default: "false"
header-mode:
description: |
Controls `rubyfmt`'s magic header comment behavior.
This can be 'none' (default), 'opt-in' (only check files containing a
`# rubyfmt: true` header), or 'opt-out' (skip files containing a
`# rubyfmt: false` header).
required: false
default: "none"
summary:
description: |
Whether to write a diff summary to the job summary
(`$GITHUB_STEP_SUMMARY`) when unformatted files are found.
required: false
default: "true"
runs:
using: composite
steps:
- name: Run rubyfmt
id: run-rubyfmt
run: |
"${GITHUB_ACTION_PATH}/action.sh"
env:
GHA_RUBYFMT_PATHS: ${{ inputs.paths }}
GHA_RUBYFMT_VERSION: ${{ inputs.version }}
GHA_RUBYFMT_FAIL_FAST: ${{ inputs.fail-fast }}
GHA_RUBYFMT_INCLUDE_GITIGNORED: ${{ inputs.include-gitignored }}
GHA_RUBYFMT_HEADER_MODE: ${{ inputs.header-mode }}
GHA_RUBYFMT_SUMMARY: ${{ inputs.summary }}
shell: bash