From 604bf884513ab45f9ee44d2a55025bc2f874b430 Mon Sep 17 00:00:00 2001 From: Karl-Aksel Puulmann Date: Tue, 26 Mar 2024 10:29:55 +0200 Subject: [PATCH] Add github action to validate whether migrations and app change at the same time (#3945) --- .github/workflows/migrations-validation.yml | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/migrations-validation.yml diff --git a/.github/workflows/migrations-validation.yml b/.github/workflows/migrations-validation.yml new file mode 100644 index 000000000..2d20350b8 --- /dev/null +++ b/.github/workflows/migrations-validation.yml @@ -0,0 +1,28 @@ +name: Validate migrations + +on: + pull_request: + paths: + - 'priv/repo/migrations/**' + - 'priv/ingest_repo/migrations/**' + +jobs: + validate: + name: App code does not change at the same time + runs-on: ubuntu-latest + + steps: + - uses: dorny/paths-filter@v3 + id: changes + with: + list-files: json + filters: | + lib: + - 'lib/**' + - 'extra/**' + - 'config/**' + + - if: steps.changes.outputs.lib == 'true' + run: | + echo "::error file=${{ fromJSON(steps.changes.outputs.lib_files)[0] }}::Code and migrations shouldn't be changed at the same time" + exit 1