diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ffd8471 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +name: build + +on: + push: + branches: + # - main + - create-workflow + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + # - name: Set linter directories + # run: | + # IFS=' ' LINTER_DIRS=($(find . -maxdepth 1 -type d -not -name '.*' -exec basename {} \; | tr '\n' ' ')) + + # - run: for i in $LINTER_DIRS; do echo "--$i--"; done + + - uses: dorny/paths-filter@v3 + id: changes + with: + filters: | + multi-language: + - 'multi-language/**' + checkstyle: + - 'checkstyle/**' + sqlint: + - 'sqlint/**' + phpcs: + - 'phpcs/**' + layout-designer-lint: + - 'layout-designer-lint/**' + python-flake8: + - 'python-flake8/**' + golangci-lint: + - 'golangci-lint/**' + rubocop: + - 'rubocop/**' + eslint: + - 'eslint/**' + nulllint: + - 'nulllint/**' + + - run: echo "${{ toJson(steps.changes.outputs.changes) }}" | jq -r '.[]' + - run: | + LINTER_DIRS=$(echo "${{ toJson(steps.changes.outputs.changes) }}" | jq -r '.[]') + for element in $LINTER_DIRS; + do + echo "Содержимое каталога $element:"; + ls "$element"; + done