Skip to content

Commit

Permalink
workflows: add a check to update cli commands docs when changes occur
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Butusov <[email protected]>
  • Loading branch information
End-rey committed Oct 29, 2024
1 parent 46614bc commit c96c7c6
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/cli-docs-update.yml
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')

0 comments on commit c96c7c6

Please sign in to comment.