Separating the creation of the Pull Request and it's comment from the command-dispatch
ADD
.github/workflows/command_dispatch.yml
+name: Command Dispatch for testing
+on:
+ issue_comment:
+ types: [created, edited]
+
+jobs:
+ command-dispatch-for-testing:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Run Build
+ uses: peter-evans/slash-command-dispatch@v2
+ with:
+ token: ${{ secrets.REPO_ACCESS_TOKEN }}
+ reaction-token: ${{ secrets.GITHUB_TOKEN }}
+ commands: run-example-tests
+ permission: write
+ issue-type: pull-request
+ repository: pulumi/examples

MODIFY
.github/workflows/pr.yml
.github/workflows/pr.yml
-name: Allow maintainers to test examples PRs
-on:
- issue_comment:
- types: [created, edited]
+name: New Pull request Open
+"on":
+ pull_request:
+ branches:
+ - master
jobs:
- runForkedBranch:
+ comment-on-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -13,12 +14,3 @@ jobs:
with:
message: 'Thank you for opening a PR! Please stand-by for one of the project maintainers to run the tests'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Run Build
- uses: peter-evans/slash-command-dispatch@v2
- with:
- token: ${{ secrets.REPO_ACCESS_TOKEN }}
- reaction-token: ${{ secrets.GITHUB_TOKEN }}
- commands: run-example-tests
- permission: write
- issue-type: pull-request
- repository: pulumi/examples

Separating the creation of the Pull Request and it's comment from the command-dispatch