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

Conditional Workflow Authentication #354

Merged
merged 2 commits into from
May 13, 2021

Conversation

MGatner
Copy link
Collaborator

@MGatner MGatner commented May 13, 2021

This is what I finally settled on for my libraries. It duplicates the Composer installation step and makes them conditional, basically: "only use the secret during Composer updates when it is not a fork pull request".

@MGatner
Copy link
Collaborator Author

MGatner commented May 13, 2021

Since the limited workflow is not authenticated I'm pretty sure failures are still related to cached Composer files. We can rerun this in a week to verify, or YOLO it and hope this the real fix this time. Disclaimer: it is working for me

@MGatner
Copy link
Collaborator Author

MGatner commented May 13, 2021

Aha! Figured it out. setup-php does its own cache of Composer files, and when it runs without a token it causes the later workflow step to fail.

For now I believe we still want to use our own cache, but it is something to investigate for the future if setup-php is actually handling part of this.

@lonnieezell
Copy link
Owner

Oh nice! Thanks for figuring that out. That's awesome.

@lonnieezell lonnieezell merged commit c7f79d1 into lonnieezell:develop May 13, 2021
@MGatner MGatner deleted the conditional-auth branch May 13, 2021 18:20
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