Skip to content

Commit

Permalink
ci: add conditional restrictions (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkasany committed Dec 15, 2023
1 parent c2e5bec commit e4dceb6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
build-preview:
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
success:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' && github.repository == 'doocs/md'
steps:
- name: Download PR artifact
uses: dawidd6/action-download-artifact@v2
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

failed:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' && github.repository == 'doocs/md'
steps:
- name: Download PR artifact
uses: dawidd6/action-download-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/preview-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: pull_request_target
jobs:
preview:
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'
steps:
- name: Create
uses: actions-cool/maintain-one-comment@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
build:
name: Create Release
runs-on: ubuntu-latest
if: github.repository == 'doocs/md'
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit e4dceb6

Please sign in to comment.