You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve workflow documentation and job output naming
- Standardized `REUSABLE_WORKFLOWS.md` with consistent structure, full
usage examples, and comprehensive input documentation for all workflows.
- Added documentation for missing workflows to `REUSABLE_WORKFLOWS.md`.
- Ensured consistency in job outputs (`has_changes`) across modernized
workflows.
Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
The workflows in `Framework-R-D/phlex/`maybe invoked as follows:
5
+
The workflows in `Framework-R-D/phlex/`may be invoked as follows:
6
6
7
7
1. Automatically as part of CI checks on a PR submitted to `Framework-R-D/phlex`, at PR creation time and thereafter on pushes to the PR branch. This should work whether your PR branch is situated in the primary repository or a fork.
8
8
1. Via triggering comments on the PR (`@phlexbot <action>`).
@@ -97,35 +97,35 @@ jobs:
97
97
- `build-path` (string, optional): Path for build artifacts.
98
98
- `skip-relevance-check` (boolean, optional, default: `false`): Bypass the check that only runs the build if C++ or CMake files have changed.
99
99
- `build-combinations` (string, optional): A space-separated list of build combinations to run.
100
-
- `ref` (string, optional): The branchor ref to check out.
101
-
- `repo` (string, optional): The repository to check out from (e.g., `my-org/my-repo`).
100
+
- `ref` (string, optional): The branch, ref, or SHA to check out.
101
+
- `repo` (string, optional): The repository to check out from.
102
102
- `pr-base-sha` (string, optional): Base SHA of the PR for relevance check.
103
103
- `pr-head-sha` (string, optional): Head SHA of the PR for relevance check.
104
104
105
-
### 2. `python-check.yaml`
105
+
### 2. `cmake-format-check.yaml`
106
106
107
-
Checks Python code for formatting and type errors using `ruff` and `mypy`.
107
+
Checks CMake files for formatting issues using `gersemi`.
# The ref and repo of the PR need to be retrieved and passed
201
+
ref: ${{ steps.get_pr_info.outputs.ref }}
202
+
repo: ${{ steps.get_pr_info.outputs.repo }}
203
+
secrets:
204
+
WORKFLOW_PAT: ${{ secrets.WORKFLOW_PAT }}
205
+
```
181
206
182
-
#### All Inputs: `markdown-fix.yaml`
207
+
#### All Inputs
183
208
184
209
- `checkout-path` (string, optional): Path to check out code to.
185
-
- `ref` (string, **required**): The branchor ref to check out.
210
+
- `ref` (string, **required**): The branch, ref, or SHA to check out.
186
211
- `repo` (string, **required**): The repository to check out from.
187
212
188
213
### 6. `markdown-check.yaml`
@@ -203,9 +228,86 @@ jobs:
203
228
- `skip-relevance-check` (boolean, optional, default: `false`): Bypass the check that only runs if Markdown files have changed. Note that this workflow automatically emulates the trigger type of the caller; it will run relevance checks if called from a `pull_request` or `push` event, and skip them (running on all files) otherwise.
204
229
- `pr-base-sha` (string, optional): Base SHA of the PR for relevance check.
205
230
- `pr-head-sha` (string, optional): Head SHA of the PR for relevance check.
206
-
- `ref` (string, optional): The branch, ref, or SHA to checkout.
207
-
- `repo` (string, optional): The repository to checkout from.
231
+
- `ref` (string, optional): The branch, ref, or SHA to check out.
232
+
- `repo` (string, optional): The repository to check out from.
233
+
234
+
### 7. `markdown-fix.yaml`
235
+
236
+
Automatically formats Markdown files using `markdownlint` and commits the changes. Typically triggered by an `issue_comment`.
237
+
238
+
#### Usage Example
239
+
240
+
```yaml
241
+
name: 'Bot Commands'
242
+
on:
243
+
issue_comment:
244
+
types: [created]
245
+
246
+
jobs:
247
+
fix-markdown:
248
+
# Run only on comments from collaborators/owners that start with the bot command
- `checkout-path` (string, optional): Path to check out code to.
305
+
- `build-path` (string, optional): Path for build artifacts.
306
+
- `language-matrix` (string, optional, default: `'["cpp", "python", "actions"]'`): JSON array of languages to analyze.
307
+
- `pr-number` (string, optional): PR number if run in PR context.
308
+
- `pr-head-repo` (string, optional): The full name of the PR head repository.
309
+
- `pr-base-repo` (string, optional): The full name of the PR base repository.
208
310
209
311
### Other Workflows
210
312
211
-
The repository also provides `actionlint-check.yaml`, `cmake-format-check.yaml`, and `codeql-analysis.yaml`, which can be used in a similar manner.
313
+
The repository also provides `clang-format-check.yaml`, `clang-format-fix.yaml`, `clang-tidy-check.yaml`, and `clang-tidy-fix.yaml`, which can be used in a similar manner.
0 commit comments