Skip to content

Commit

Permalink
CI(pre-merge-checks): run on PRs... sometimes...
Browse files Browse the repository at this point in the history
  • Loading branch information
bayandin committed Nov 11, 2024
1 parent e0e61a3 commit 89d4f0b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/pre-merge-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 89d4f0b

Please sign in to comment.