From 9af64558ba9f8237ea304fc53df5f38a79a62558 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Mon, 11 Nov 2024 17:44:41 +0000 Subject: [PATCH] CI(pre-merge-checks): prepare for rust a bit --- .github/workflows/pre-merge-checks.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-merge-checks.yml b/.github/workflows/pre-merge-checks.yml index 137943d8adf0..496e23e3024f 100644 --- a/.github/workflows/pre-merge-checks.yml +++ b/.github/workflows/pre-merge-checks.yml @@ -16,26 +16,40 @@ jobs: get-changed-files: runs-on: ubuntu-22.04 outputs: + common-changed: ${{ steps.common-src.outputs.any_changed }} python-changed: ${{ steps.python-src.outputs.any_changed }} + any-changed: | + ${{ steps.common-src.outputs.any_changed == 'true' || + steps.python-src.outputs.any_changed == 'true' }} steps: - uses: actions/checkout@v4 + - uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4 - id: python-src + id: common-src with: files: | + .github/workflows/build-build-tools-image.yml .github/workflows/pre-merge-checks.yml + + - uses: tj-actions/changed-files@4edd678ac3f81e2dc578756871e4d00c19191daf # v45.0.4 + id: python-src + with: + files: | + .github/workflows/_check-codestyle-python.yml **/**.py poetry.lock pyproject.toml - name: PRINT ALL CHANGED FILES FOR DEBUG PURPOSES env: + COMMON_CHANGED_FILES: ${{ steps.common-src.outputs.all_changed_files }} PYTHON_CHANGED_FILES: ${{ steps.python-src.outputs.all_changed_files }} run: | + echo "${COMMON_CHANGED_FILES}" echo "${PYTHON_CHANGED_FILES}" build-build-tools-image: - if: needs.get-changed-files.outputs.python-changed == 'true' + if: needs.get-changed-files.outputs.any-changed == 'true' needs: [ get-changed-files ] uses: ./.github/workflows/build-build-tools-image.yml with: @@ -45,7 +59,9 @@ jobs: secrets: inherit check-codestyle-python: - if: needs.get-changed-files.outputs.python-changed == 'true' + if: | + needs.get-changed-files.outputs.python-changed == 'true' || + needs.get-changed-files.outputs.common-changed == 'true' needs: [ get-changed-files, build-build-tools-image ] uses: ./.github/workflows/_check-codestyle-python.yml with: