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

Deploy CI stage is skipped for main commits; staging environment not updating #3237

Closed
DanielRyanSmith opened this issue Mar 29, 2023 · 3 comments · Fixed by #3238
Closed

Comments

@DanielRyanSmith
Copy link
Contributor

Due to the recent change to skip the deploy step for PRs from forked repos, the commits to main from any pull request is also skipping this step, which means that our staging environment is not automatically updating. We'll need to investigate why this happens and find a way to avoid this step for forked repos but still run this step for commits to main.

CC @jcscottiii @KyleJu

@KyleJu
Copy link
Collaborator

KyleJu commented Mar 29, 2023

I believe the issue is with specifying pull_request as a part of requirement:

github.event.pull_request.head.repo.full_name == 'web-platform-tests/wpt.fyi

The commits on main are not a part of pull_request events

@DanielRyanSmith
Copy link
Contributor Author

@KyleJu you're right that this is the cause. I'm wondering the best way to word the line in that logic to still skip the step for forked repository PRs but still run the step for main commits. 🤔 I haven't looked deeply into it, but I will update if I find anything.

jcscottiii added a commit that referenced this issue Mar 30, 2023
The main conditional makes sure that the github.repository is always 'web-platform-tests/wpt.fyi'

Then we can check if the event comes from a PR event or non PR event.
- For the PR event, check if a fork and not dependabot
- For non PR event, we can let the event happen (which is only the push
event according to the events in the `on` section above). Even for the
push event, we can let dependabot be the actor since the PR has already
been verified by a human and it will have access to the credentials when
we merge it.

Inspiration:
- https://github.com/orgs/community/discussions/26409#discussioncomment-3251818

Fixes: #3237
@jcscottiii
Copy link
Collaborator

I just put up a PR to hopefully address this

jcscottiii added a commit that referenced this issue Mar 30, 2023
The main conditional makes sure that the github.repository is always 'web-platform-tests/wpt.fyi'

Then we can check if the event comes from a PR event or non PR event.
- For the PR event, check if a fork and not dependabot
- For non PR event, we can let the event happen (which is only the push
event according to the events in the `on` section above). Even for the
push event, we can let dependabot be the actor since the PR has already
been verified by a human and it will have access to the credentials when
we merge it.

Inspiration:
- https://github.com/orgs/community/discussions/26409#discussioncomment-3251818

Fixes: #3237
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 a pull request may close this issue.

3 participants