File tree Expand file tree Collapse file tree 3 files changed +58
-70
lines changed Expand file tree Collapse file tree 3 files changed +58
-70
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ " on " :
3
+ workflow_call :
4
+ inputs :
5
+ jobs_run_on :
6
+ default : " ubuntu-latest"
7
+ description : " The runner group on which jobs will run."
8
+ required : false
9
+ type : " string"
10
+ timeout_minutes :
11
+ description : " The maximum time (in minutes) for a job to run."
12
+ default : 5
13
+ required : false
14
+ type : " number"
15
+ working_directory :
16
+ description : " The working directory where all jobs should be executed."
17
+ default : " ."
18
+ required : false
19
+ type : " string"
20
+ jobs :
21
+ prettier :
22
+ defaults :
23
+ run :
24
+ working-directory : " ${{ inputs.working_directory }}"
25
+ runs-on : " ${{ inputs.jobs_run_on }}"
26
+ timeout-minutes : " ${{ inputs.timeout_minutes }}"
27
+ env :
28
+ PRETTIER_VERSION : " 3"
29
+ steps :
30
+ - name : " Checkout repo"
31
+ uses : " actions/checkout@v4"
32
+ - name : " Set up Node.js"
33
+ uses : " actions/setup-node@v4"
34
+ with :
35
+ node-version : " 22.x"
36
+ - name : " Get yarn cache directory"
37
+ id : " cache-dir"
38
+ run : >-
39
+ echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
40
+ - uses : " actions/cache@v4"
41
+ id : " cache"
42
+ with :
43
+ path : " ${{ steps.cache-dir.outputs.dir }}"
44
+ key : " ${{ runner.os }}-prettier@${{ env.PRETTIER_VERSION }}"
45
+ - name : " Install prettier"
46
+ run : >-
47
+ yarn add "prettier@${{ env.PRETTIER_VERSION }}"
48
+ - name : " Put node executables in the system PATH"
49
+ run : >-
50
+ echo -n "$(yarn bin)" >> $GITHUB_PATH
51
+ - name : " Check all files with prettier"
52
+ run : >-
53
+ prettier --prose-wrap always --check **/*.md
Original file line number Diff line number Diff line change @@ -113,25 +113,17 @@ and the [release-please-action](https://github.com/googleapis/release-please-act
113
113
These are local Actions that run for this repository. This workflow is not
114
114
visible or usable outside of this repository.
115
115
116
- # ## markdownlint.yaml
117
-
118
- This workflow will run the
119
- [DavidAnson/markdownlint-cli2-action](https://github.com/DavidAnson/markdownlint-cli2-action)
120
- action to lint markdown files.
121
-
122
- # ### markdownlint Inputs
123
-
124
- * `config_file`: The configuration file to use. Default: `.markdownlint-cli2.yaml`
125
- * `fix`: If set to true, fix any issues found. Default: `false`
126
- * `globs`: The glob to use to find all markdown files. Default: `**/*.md`
127
- * `separator`: The character used to separate globs. Default: `,`
128
-
129
116
# ## pre-commit.yaml
130
117
131
118
This workflow runs the
132
119
[pre-commmit action](https://github.com/pre-commit/action) with minimal options
133
120
for configuration.
134
121
122
+ # ## prettier.yaml
123
+
124
+ This workflow will run [prettier](https://prettier.io/) to check formatting of
125
+ markdown files. The only option passed is `--prose-wrap always`.
126
+
135
127
# ## puppet-build.yaml
136
128
137
129
This workflow will setup [Puppet][7] using
You can’t perform that action at this time.
0 commit comments