Skip to content

Commit

Permalink
Fix workflow condition to include pull_request event type
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Apr 8, 2024
1 parent 391d01b commit 421adc3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/main .yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ on:
push:
branches:
- main
pull_request:
types: [closed]

jobs:
remove_duplicates:
runs-on: ubuntu-latest

if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: >
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
github.actor.login == 'github-actions[bot]' ||
github.event_name == 'pull_request' &&
github.event.pull_request.merged == true &&
github.actor.login == 'github-actions[bot]'
steps:
- name: Checkout Repository
Expand Down

0 comments on commit 421adc3

Please sign in to comment.