|
21 | 21 | name: Check XML files
|
22 | 22 | runs-on: ubuntu-latest
|
23 | 23 |
|
| 24 | + # Don't run the cronjob in this workflow on forks. |
| 25 | + if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') |
| 26 | + |
24 | 27 | env:
|
25 | 28 | XMLLINT_INDENT: ' '
|
26 | 29 |
|
@@ -71,99 +74,23 @@ jobs:
|
71 | 74 |
|
72 | 75 | yamllint:
|
73 | 76 | name: 'Lint Yaml'
|
74 |
| - runs-on: ubuntu-latest |
75 |
| - |
76 |
| - steps: |
77 |
| - - name: Checkout code |
78 |
| - uses: actions/checkout@v4 |
79 |
| - |
80 |
| - - name: Run Yamllint on all yaml files in repo |
81 |
| - run: yamllint . --format colored --strict |
| 77 | + # Don't run the cronjob in this workflow on forks. |
| 78 | + if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards') |
82 | 79 |
|
83 |
| - - name: Pipe Yamllint results on to GH for inline display |
84 |
| - if: ${{ failure() }} |
85 |
| - run: yamllint . --format github --strict |
| 80 | + uses: PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@main |
| 81 | + with: |
| 82 | + strict: true |
86 | 83 |
|
87 | 84 | markdownlint:
|
88 | 85 | name: 'Lint Markdown'
|
89 |
| - runs-on: ubuntu-latest |
90 |
| - |
91 | 86 | # Don't run the cronjob in this workflow on forks.
|
92 | 87 | if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards')
|
93 | 88 |
|
94 |
| - steps: |
95 |
| - - name: Checkout code |
96 |
| - uses: actions/checkout@v4 |
97 |
| - |
98 |
| - # @link https://github.com/marketplace/actions/problem-matcher-for-markdownlint-cli |
99 |
| - - name: Enable showing issue in PRs |
100 |
| - uses: xt0rted/markdownlint-problem-matcher@v3 |
101 |
| - |
102 |
| - # @link https://github.com/marketplace/actions/markdownlint-cli2-action |
103 |
| - - name: Check markdown with CLI2 |
104 |
| - uses: DavidAnson/markdownlint-cli2-action@v17 |
| 89 | + uses: PHPCSStandards/.github/.github/workflows/reusable-markdownlint.yml@main |
105 | 90 |
|
106 | 91 | remark:
|
107 | 92 | name: 'QA Markdown'
|
108 |
| - runs-on: ubuntu-latest |
109 |
| - |
110 | 93 | # Don't run the cronjob in this workflow on forks.
|
111 | 94 | if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'PHPCSStandards')
|
112 | 95 |
|
113 |
| - steps: |
114 |
| - - name: Checkout code |
115 |
| - uses: actions/checkout@v4 |
116 |
| - |
117 |
| - - name: Set up node and enable caching of dependencies |
118 |
| - uses: actions/setup-node@v4 |
119 |
| - with: |
120 |
| - node-version: "20" |
121 |
| - |
122 |
| - # To make the command available on CLI, it needs to be installed globally. |
123 |
| - - name: Install Remark CLI globally |
124 |
| - run: npm install --global remark-cli --foreground-scripts true --fund false |
125 |
| - |
126 |
| - # To allow for creating a custom config which references rules which are included |
127 |
| - # in the presets, without having to install all rules individually, a local install |
128 |
| - # works best (and installing the presets in the first place, of course). |
129 |
| - # |
130 |
| - # Note: the first group of packages are all part of the mono "Remark lint" repo. |
131 |
| - # The second group of packages (heading-whitespace and down) are additional |
132 |
| - # "external" rules/plugins. |
133 |
| - - name: Install Remark rules locally |
134 |
| - run: > |
135 |
| - npm install --foreground-scripts true --fund false |
136 |
| - remark-lint |
137 |
| - remark-gfm |
138 |
| - remark-preset-lint-consistent |
139 |
| - remark-preset-lint-recommended |
140 |
| - remark-preset-lint-markdown-style-guide |
141 |
| - remark-lint-checkbox-content-indent |
142 |
| - remark-lint-linebreak-style |
143 |
| - remark-lint-no-dead-urls |
144 |
| - remark-lint-no-duplicate-defined-urls |
145 |
| - remark-lint-no-empty-url |
146 |
| - remark-lint-no-heading-like-paragraph |
147 |
| - remark-lint-no-reference-like-url |
148 |
| - remark-lint-no-unneeded-full-reference-image |
149 |
| - remark-lint-no-unneeded-full-reference-link |
150 |
| - remark-lint-strikethrough-marker |
151 |
| - remark-lint-heading-whitespace |
152 |
| - remark-lint-list-item-punctuation |
153 |
| - remark-lint-match-punctuation |
154 |
| - remark-lint-no-hr-after-heading |
155 |
| - remark-lint-are-links-valid-duplicate |
156 |
| - remark-validate-links |
157 |
| - |
158 |
| - - name: Run Remark-lint |
159 |
| - run: remark . --frail |
160 |
| - |
161 |
| - # @link https://github.com/reviewdog/action-remark-lint |
162 |
| - - name: Show Remark-lint annotations in PR |
163 |
| - if: ${{ failure() && github.event_name == 'pull_request' }} |
164 |
| - uses: reviewdog/action-remark-lint@v5 |
165 |
| - with: |
166 |
| - fail_on_error: true |
167 |
| - install_deps: false |
168 |
| - level: info |
169 |
| - reporter: github-pr-check |
| 96 | + uses: PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main |
0 commit comments