Skip to content

Commit

Permalink
Only execute publish job if executed at the homebridge/HAP-NodeJS repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Apr 8, 2020
1 parent 1d25deb commit 0c7edda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/nodejs-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
CI: true

publish-npm:
if: github.repository == 'homebridge/HAP-NodeJS'

needs: build

runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

publish-npm:
# publish should only ran on 'push' event and if a version tag was created
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: github.repository == 'homebridge/HAP-NodeJS' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

needs: build # only run if build succeeds

Expand Down

0 comments on commit 0c7edda

Please sign in to comment.