Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify if repository its fork #10

Closed
Mikael-R opened this issue Aug 30, 2020 · 2 comments
Closed

Verify if repository its fork #10

Mikael-R opened this issue Aug 30, 2020 · 2 comments

Comments

@Mikael-R
Copy link

Dont run publish script if repository its fork

@JamesMessinger
Copy link
Member

Logic like that belongs in your GitHub Actions script, not in this action. See the following GitHub Actions documentation for details:

For example, to skip your "publish" step on a fork, you could do something like this:

- name: Publish to NPM
  if: github.repository == 'MyOrg/MyRepo'    # <--- Only run this step on your main repo
  uses: JS-DevTools/npm-publish@v1
  with:
    token: ${{ secrets.NPM_TOKEN }}

@Mikael-R
Copy link
Author

It really is better, thanks 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants