Skip to content

Commit

Permalink
Merge pull request #30 from elezar/trigger-on-push
Browse files Browse the repository at this point in the history
Only use merge event for closed PR
  • Loading branch information
elezar authored Nov 21, 2023
2 parents 720ca15 + 4058fe3 commit 9323da2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:
types:
- opened
- synchronize
- closed
branches:
- main
- release-*
Expand All @@ -31,10 +30,9 @@ on:

jobs:
build-image:
# We trigger builds on MERGED pull requests or on non-closed PRs that are not created against a fork.
# We trigger image builds on push events (MERGED pull requests) or on non-closed PRs that are not created against a fork.
if: |
(github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) ||
(github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'push')
runs-on: ubuntu-latest
strategy:
Expand Down

0 comments on commit 9323da2

Please sign in to comment.