Skip to content

Commit

Permalink
fix(pipeline): fails on forks (#441)
Browse files Browse the repository at this point in the history
* chore: another try

* chore: another try

* chore: another try

* chore: using this for a test

* Update 00-init.yml

* Update 00-init.yml

* Update action.yml

* Update 00-init.yml

* Update default.yml

* Update pull-request-opened.yml

* Update pull-request.yml
  • Loading branch information
mfranzke authored Nov 1, 2022
1 parent 66521ce commit 1ba68db
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/actions/cancel-workflow/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ runs:
-H "Accept: application/vnd.github+json" \
/repos/db-ui/elements/actions/runs/${{ github.run_id }}/cancel
shell: bash
if: github.repository == 'db-ui/elements'
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
env:
GH_TOKEN: ${{ inputs.token }}
4 changes: 2 additions & 2 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
needs: [init]

scan-secrets:
if: github.repository == 'db-ui/elements'
if: github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui'
uses: ./.github/workflows/00-scan-secrets.yml

install-cypress:
Expand Down Expand Up @@ -63,5 +63,5 @@ jobs:

deploy:
uses: ./.github/workflows/03-deploy-gh-pages.yml
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'db-ui/elements' }}
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui' }}
needs: [validate, test, cypress]
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ permissions:

jobs:
add-url-comment:
if: github.repository == 'db-ui/elements'
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
uses: ./.github/workflows/99-add-url-comment.yml
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
uses: ./.github/workflows/99-dependency-review.yml

labeler:
if: github.repository == 'db-ui/elements'
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
uses: ./.github/workflows/99-labeler.yml

0 comments on commit 1ba68db

Please sign in to comment.