-
Notifications
You must be signed in to change notification settings - Fork 3k
35 lines (31 loc) · 1.67 KB
/
slash-command-dispatch-partnerCenter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Slash Command Dispatch - Publish To Partner Center
env:
REPO_OWNER: "${{ vars.REPO_OWNER }}"
REPO_NAME: "${{ vars.REPO_NAME }}"
on:
issue_comment:
types: [created]
pull_request:
types: [ closed ]
jobs:
checkAutomatedPR:
if: ${{ github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork && github.event.issue.pull_request && contains(github.event.comment.body, '/partnercenter') }}
uses: ./.github/workflows/checkAutomatedPR.yaml
isWorkflowRunAllowedToUser:
if: ${{ github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork && github.event.issue.pull_request && contains(github.event.comment.body, '/partnercenter') }}
uses: ./.github/workflows/allowedWorkflowRun.yaml
pullRequestStatus:
if: ${{ !github.event.pull_request.head.repo.fork && github.event.issue.pull_request && contains(github.event.comment.body, '/partnercenter') }}
uses: ./.github/workflows/pullRequestStatus.yaml
slashCommandDispatchPartnerCenterPublish:
runs-on: ubuntu-latest
needs: [isWorkflowRunAllowedToUser, pullRequestStatus, checkAutomatedPR]
if: ${{ success() && needs.isWorkflowRunAllowedToUser.outputs.isWorkflowRunAllowed == 'True' && needs.pullRequestStatus.outputs.isPullRequestMerged == 'True' && needs.checkAutomatedPR.outputs.isAutomatedPR == 'False' && !github.event.pull_request.head.repo.fork}}
steps:
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@67dfeb76529b35541a7c536976cba367cd2d364b
with:
commands: partnercenter
repository: ${{env.REPO_OWNER}}/${{env.REPO_NAME}}
issue-type: pull-request
reactions: false