@@ -62,13 +62,15 @@ jobs:
6262 git checkout -- jsonnet/jsonnetfile.lock.json;
6363 fi
6464 - name : Get app token for pull request creation
65+ if : github.event_name != 'pull_request'
6566 id : pr
6667 uses : actions/create-github-app-token@v3
6768 with :
6869 app-id : ${{ secrets.pr-app-id }}
6970 private-key : ${{ secrets.pr-app-private-key }}
7071 owner : openshift
7172 - name : Get app token for repository cloning
73+ if : github.event_name != 'pull_request'
7274 id : cloner
7375 uses : actions/create-github-app-token@v3
7476 with :
8082 run : |
8183 echo sandbox="$(echo ${{ inputs.make-targets }} | sed 's/ /-/g')" >> "$GITHUB_OUTPUT"
8284 - name : Create Pull Request
85+ if : github.event_name != 'pull_request'
8386 id : create-pr
8487 uses : peter-evans/create-pull-request@v8
8588 with :
9699 branch-token : ${{ steps.cloner.outputs.token }}
97100 maintainer-can-modify : false
98101 - name : Compose slack message body
102+ if : github.event_name != 'pull_request' && success()
99103 id : slack-message
100104 run : |
101105 if [ "${{ steps.create-pr.outputs.pull-request-url }}" == "" ]; then
@@ -107,7 +111,7 @@ jobs:
107111 fi
108112 - uses : slackapi/slack-github-action@v3
109113 continue-on-error : true
110- if : success()
114+ if : github.event_name != 'pull_request' && success()
111115 with :
112116 webhook : ${{ secrets.slack-webhook-url }}
113117 webhook-type : incoming-webhook
@@ -120,7 +124,7 @@ jobs:
120124 }
121125 - uses : slackapi/slack-github-action@v3
122126 continue-on-error : true
123- if : failure()
127+ if : github.event_name != 'pull_request' && failure()
124128 with :
125129 webhook : ${{ secrets.slack-webhook-url }}
126130 webhook-type : incoming-webhook
0 commit comments