Skip to content

Commit

Permalink
fix: bac-24 Only run publish-beta workflow on trusted PRs
Browse files Browse the repository at this point in the history
Only run this job if the PR is from a trusted collaborator (i.e. not a fork)

Signed-off-by: Lucian Buzzo <lucian.buzzo@gmail.com>
  • Loading branch information
LucianBuzzo committed Mar 27, 2023
1 parent 3305ff8 commit 96c19d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
release:
runs-on: ubuntu-latest
# Only run this job if the PR is from a trusted collaborator (i.e. not a fork)
if: github.event.pull_request.head.repo.full_name == github.repository
env:
CEREBRUM_NPM_TOKEN: ${{ secrets.CEREBRUM_NPM_TOKEN }}
steps:
Expand Down Expand Up @@ -38,4 +40,4 @@ jobs:
- name: Publish beta package
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.CEREBRUM_PUBLISH_NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.CEREBRUM_PUBLISH_NPM_TOKEN }}

0 comments on commit 96c19d2

Please sign in to comment.