Skip to content

Commit 1ba68db

Browse files
authored
fix(pipeline): fails on forks (#441)
* 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
1 parent 66521ce commit 1ba68db

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/actions/cancel-workflow/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ runs:
1414
-H "Accept: application/vnd.github+json" \
1515
/repos/db-ui/elements/actions/runs/${{ github.run_id }}/cancel
1616
shell: bash
17-
if: github.repository == 'db-ui/elements'
17+
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
1818
env:
1919
GH_TOKEN: ${{ inputs.token }}

.github/workflows/default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
needs: [init]
1818

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

2323
install-cypress:
@@ -63,5 +63,5 @@ jobs:
6363

6464
deploy:
6565
uses: ./.github/workflows/03-deploy-gh-pages.yml
66-
if: ${{ github.actor != 'dependabot[bot]' && github.repository == 'db-ui/elements' }}
66+
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request == null || github.event.pull_request.head.repo.owner.login == 'db-ui' }}
6767
needs: [validate, test, cypress]

.github/workflows/pull-request-opened.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ permissions:
1111

1212
jobs:
1313
add-url-comment:
14-
if: github.repository == 'db-ui/elements'
14+
if: github.event.pull_request.head.repo.owner.login == 'db-ui'
1515
uses: ./.github/workflows/99-add-url-comment.yml

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
uses: ./.github/workflows/99-dependency-review.yml
2323

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

0 commit comments

Comments
 (0)