Skip to content

Commit

Permalink
add CI on external PR (#879)
Browse files Browse the repository at this point in the history
* add CI on external PR
* avoid duplicate
* and no CI for md modifications
  • Loading branch information
ildyria authored Jan 20, 2021
1 parent c7bbd53 commit a368964
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/Build-Dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ name: Build-Dist
# Run this workflow every time a new commit pushed to your repository
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'

jobs:
tests:

runs-on: ${{ matrix.operating-system }}
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)

# Service containers to run with `container-job`
services:
Expand Down Expand Up @@ -41,6 +48,11 @@ jobs:
key: cache-v1 # can be any string, change to clear the extension cache.

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

# Checks out a copy of your repository on the ubuntu machine
- name: Checkout code
uses: actions/checkout@v2
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/Build-Full-SQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ name: Build-Full-SQL
# Run this workflow every time a new commit pushed to your repository
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'

jobs:
tests:

runs-on: ${{ matrix.operating-system }}

# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch.
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)

# Service containers to run with `container-job`
services:
# Label used to access the service container
Expand Down Expand Up @@ -41,6 +48,11 @@ jobs:
key: cache-v1 # can be any string, change to clear the extension cache.

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

# Checks out a copy of your repository on the ubuntu machine
- name: Checkout code
uses: actions/checkout@v2
Expand Down

0 comments on commit a368964

Please sign in to comment.