Skip to content

create build workflow #29

create build workflow

create build workflow #29

Workflow file for this run

name: build
on:
push:
branches:
# - main
- create-workflow
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
directories: ${{ steps.set_directories.outputs.directories }}
steps:
- uses: actions/checkout@v4
- 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/**'
- id: set_directories
run: echo "directories=${{ toJson(steps.changes.outputs.changes) }}" >> "$GITHUB_OUTPUT"
build:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
directory: ${{ fromJson(needs.prepare.outputs.directories) }}
steps:
- name: Checkout repository
run: echo "${{ matrix.directory }}"
# - 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
# - 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