From c5fdb7bedf9c454ba9022e510a9e44533b915f91 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 11 Oct 2022 09:29:12 +0300 Subject: [PATCH] [#1876] .github: Add an action monitoring config updates Signed-off-by: Evgenii Stratonikov --- .github/workflows/config-update.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/config-update.yml diff --git a/.github/workflows/config-update.yml b/.github/workflows/config-update.yml new file mode 100644 index 000000000..44d771143 --- /dev/null +++ b/.github/workflows/config-update.yml @@ -0,0 +1,36 @@ +name: Configuration check + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + name: config-check + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get changed config-related files + id: config-diff + uses: tj-actions/changed-files@v29 + with: + files: | + config/** + cmd/neofs-node/config/** + + - name: Get changed doc files + id: docs-diff + uses: tj-actions/changed-files@v29 + with: + files: docs/** + + - name: Fail if config files are changed but the documentation is not updated + if: steps.config-diff.outputs.any_changed == 'true' && steps.docs-diff.outputs.any_changed == 'false' + uses: actions/github-script@v3 + with: + script: | + core.setFailed('Documentation has not been updated')