Skip to content

Commit

Permalink
create build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
corsicanec82 committed Sep 6, 2024
1 parent 0d30a31 commit f6974ed
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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
1 change: 1 addition & 0 deletions eslint/app/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions multi-language/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions phpcs/app/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1

0 comments on commit f6974ed

Please sign in to comment.