Skip to content

ci: github actions: only deploy pytest-dev/pytest #6474

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

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Jan 16, 2020

No description provided.

@blueyed blueyed requested a review from nicoddemus January 16, 2020 12:58
@@ -159,7 +159,7 @@ jobs:
name: ${{ matrix.name }}

deploy:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think this is necessary?

  • The secrets won't be available outside pytest-dev anyway
  • I've tested this on my fork, so this change would prevent that in the future

I'm not entirely against it, just would like to know the actual reason for it. 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secrets won't be available outside pytest-dev anyway

Sure, I expect this to cause an error then. I.e. no harm, but "confusing".

I've tested this on my fork, so this change would prevent that in the future

That's similar how you would have to enable codecov explicitly when testing on a fork, no?

I think forks should have to enable this explicitly (e.g. in my fork), especially given that "deploy" can be more harmful than "uploading coverage" - although I can see that the coverage token is in the repo itself, while it is not there for "deploy".
So this is merely to avoid an error on forks I guess.

I'm +0 on this myself, feel free to close.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I expect this to cause an error then. I.e. no harm, but "confusing".

No, it just skips the task.

So this is merely to avoid an error on forks I guess.

This would only happen if a pytest maintainer explicitly added a secret with their upload token to their own fork.

I'm +0 on this myself, feel free to close.

Nah no worries, let's have the extra check. If one needs to test it again in the future, it is just a matter of commenting out that condition. 👍

@nicoddemus nicoddemus merged commit b91c721 into pytest-dev:master Jan 16, 2020
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

Successfully merging this pull request may close these issues.

2 participants