diff --git a/.github/workflows/pre-merge-checks.yml b/.github/workflows/pre-merge-checks.yml index 137943d8adf0..afae113d7c12 100644 --- a/.github/workflows/pre-merge-checks.yml +++ b/.github/workflows/pre-merge-checks.yml @@ -4,6 +4,13 @@ on: merge_group: branches: - main + # Trigger the workflow also on PRs which changes the workflow itself or reusable workflow it uses. + # Note, that `conclusion` job will be skipped for such PRs. + pull_request: + paths: + - '.github/workflows/pre-merge-checks.yml' + - '.github/workflows/build-build-tools-image.yml' + - '.github/workflows/_check-codestyle-python.yml' defaults: run: @@ -35,7 +42,7 @@ jobs: echo "${PYTHON_CHANGED_FILES}" build-build-tools-image: - if: needs.get-changed-files.outputs.python-changed == 'true' + if: needs.get-changed-files.outputs.python-changed == 'true' || github.event_name == 'pull_request' needs: [ get-changed-files ] uses: ./.github/workflows/build-build-tools-image.yml with: @@ -45,7 +52,7 @@ jobs: secrets: inherit check-codestyle-python: - if: needs.get-changed-files.outputs.python-changed == 'true' + if: needs.get-changed-files.outputs.python-changed == 'true' || github.event_name == 'pull_request' needs: [ get-changed-files, build-build-tools-image ] uses: ./.github/workflows/_check-codestyle-python.yml with: @@ -58,7 +65,7 @@ jobs: # - conclusion # - neon-cloud-e2e conclusion: - if: always() + if: always() && github.event_name != 'pull_request' permissions: statuses: write # for `github.repos.createCommitStatus(...)` needs: