Skip to content

Commit eabd9db

Browse files
authored
Update conditions for build-deploy job
Refine conditions for build-deploy job in workflow.
1 parent 5eea3e4 commit eabd9db

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/dev.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ concurrency:
1818

1919
jobs:
2020
build-deploy:
21-
if: github.event.action != 'closed' # If closing the PR, no publishing
21+
# If :
22+
# If closing the PR, no publishing
23+
# If event is push to a branch (contains ...) and a PR from that branch is opened
24+
if: |
25+
github.event_name == 'pull_request' && github.event.action != 'closed' ||
26+
(github.event_name == 'push' && contains(github.ref, 'refs/heads/') && github.repository == github.event.pull_request.head.repo.full_name)
2227
runs-on: ubuntu-latest
2328
steps:
2429
- name: Check out repository

0 commit comments

Comments
 (0)