Skip to content

Commit

Permalink
ci: improve fork detection
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK committed Jul 7, 2022
1 parent 4930d7f commit bad5baa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:
should-deploy: >-
${{
runner.os == 'Linux'
&& (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
&& !github.event.repository.fork
&& (
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name == github.repository
)
}}
maven-central-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
signing-key: ${{ secrets.SIGNING_KEY }}
Expand All @@ -36,7 +40,12 @@ jobs:
needs:
- build
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
if: >-
!github.event.repository.fork
&& (
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name == github.repository
)
steps:
- name: Checkout
uses: actions/checkout@v3.0.2
Expand Down

0 comments on commit bad5baa

Please sign in to comment.