Skip to content

Commit

Permalink
Moving examples repo to allow forks and PRs to co-exist
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Nov 30, 2020
1 parent 21a0f83 commit 9f14181
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: New Pull request Open

jobs:
comment-on-pr:
# We only care about commenting on a PR if the PR is from a fork
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/run-tests-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Run Examples Tests
on:
repository_dispatch:
types: [run-example-tests-command]
pull_request:
branches:
- master

env:
PULUMI_TEST_OWNER: ${{ secrets.PULUMI_TEST_OWNER }}
Expand All @@ -27,7 +30,23 @@ env:
LINODE_API_TOKEN: ${{ secrets.LINODE_API_TOKEN }}
PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }}
jobs:
comment-on-pr:
# We only care about commenting on a PR if the PR is from a fork
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Comment PR
uses: thollander/actions-comment-pull-request@master
with:
message: |
PR is now waiting for a maintainer to run the acceptance tests.
**Note for the maintainer:** To run the acceptance tests, please comment */run-example-tests* on the PR
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment-notification:
# We only care about commenting on a PR if the PR is from a fork
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Create URL to the run output
Expand All @@ -54,6 +73,7 @@ jobs:
node-version: [14.x]
python-version: [3.7]
dotnet-version: [3.1.x]
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ matrix.platform }}
steps:
- name: Install DotNet ${{ matrix.dotnet-version }}
Expand Down Expand Up @@ -157,6 +177,7 @@ jobs:
node-version: [14.x]
python-version: [3.7]
dotnet-version: [3.1.x]
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ matrix.platform }}
steps:
- name: Install DotNet ${{ matrix.dotnet-version }}
Expand Down Expand Up @@ -227,7 +248,7 @@ jobs:
python-version: [3.7]
dotnet-version: [3.1.x]
runs-on: ${{ matrix.platform }}
if: ${{ always() }}
if: ${{ always() }} && github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Install DotNet ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v1
Expand Down Expand Up @@ -296,6 +317,7 @@ jobs:
node-version: [14.x]
python-version: [3.7]
dotnet-version: [3.1.x]
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ matrix.platform }}
steps:
- name: Install DotNet ${{ matrix.dotnet-version }}
Expand Down

0 comments on commit 9f14181

Please sign in to comment.