-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: add a check to update cli commands docs when changes occur
Signed-off-by: Andrey Butusov <[email protected]>
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CLI commands docs check | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- support/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: cli-docs-check | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get changed CLI-related files | ||
id: cli-diff | ||
uses: tj-actions/changed-files@v42 | ||
with: | ||
files: | | ||
cmd/neofs-cli/** | ||
- name: Get changed CLI doc files | ||
id: docs-diff | ||
uses: tj-actions/changed-files@v42 | ||
with: | ||
files: docs/cli-commands/** | ||
|
||
- name: Fail if CLI files are changed but the documentation is not updated | ||
if: steps.cli-diff.outputs.any_changed == 'true' && steps.docs-diff.outputs.any_changed == 'false' | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
core.setFailed('CLI documentation has not been updated') |