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

Use the @actions/http-client and @actions/github modules for proxy support #124

Merged
merged 38 commits into from
Mar 9, 2023

Conversation

JamesMGreene
Copy link
Contributor

@JamesMGreene JamesMGreene commented Feb 22, 2023

Fixes #112
Closes #128
Closes #111
Closes #106

Shout out to @daleyjem / @jeremy-daley-kr for reporting the issue, proposing a PR, discussing approaches, and hopefully also being up for testing this branch out...? 😁🤞🏻🙏🏻

TODO:

@JamesMGreene JamesMGreene requested a review from a team as a code owner February 22, 2023 14:32
@JamesMGreene
Copy link
Contributor Author

@jeremy-daley-kr If you could verify the needed proxy support with this branch, that would be amazing! ❤️

        uses: actions/deploy-pages@actions-http-client

src/deployment.js Outdated Show resolved Hide resolved
core.info('Reported success!')
core.setOutput('status', 'succeed')
if (this.deploymentInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is always truthy, thanks to line 57

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So long as the methods are call in the intended order. 😅 Less of a concern for the status check but I picture a future where we invoke cancel() potentially in a post-step if the workflow run fails or is canceled or something that may need to be able to operate without this.deploymentInfo. We're not there today, though, so your point is definitely valid. 👍🏻

@jeremy-daley-kr
Copy link

jeremy-daley-kr commented Feb 23, 2023

@JamesMGreene I'm getting this when I target your branch...

image

Error: TypeError: octokit.rest.repos.createPagesDeployment is not a function

Update: I think that's what I was seeing when I first tried to go about this method, is that not all functions that have been added to octokit are available yet with the current version of @actions/core, so maybe .request(...) needs to be used in the meantime.

@JamesMGreene
Copy link
Contributor Author

@jeremy-daley-kr Ah, my bad. 🤦🏻‍♂️ I've updated to use octokit.request like you suggested, so please feel free to give it another try when you get a chance.

@jeremy-daley-kr
Copy link

@JamesMGreene Definitely getting there, but now I've got this:
image

@jeremy-daley-kr
Copy link

I think the page itself deployed. Maybe some optional chaining would get me further along to fill you in with more details?

@JamesMGreene
Copy link
Contributor Author

Thanks for the feedback, @jeremy-daley-kr! Sorry it didn't go smoothly. 😖

I'll find some time to do further testing on our side before I ask you to check again. 😅

@jeremy-daley-kr
Copy link

Thanks for the feedback, @jeremy-daley-kr! Sorry it didn't go smoothly. 😖

I'll find some time to do further testing on our side before I ask you to check again. 😅

No worries, man. I appreciate you sticking with it. I realize it's a bit harder to test if not behind a proxy yourself. If Github had a way of pairing, I'd just as soon do that.

All I need to do at this point is just re-run the failed job since it pulls the latest from your branch, so just let me know.

@JamesMGreene
Copy link
Contributor Author

@jeremy-daley-kr Can you give this another try? I think I've worked out the kinks now. 🤞🏻 😅

Copy link
Collaborator

@tcbyrd tcbyrd left a comment

Choose a reason for hiding this comment

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

LGTM. Just a few comments, but nothing blocking.

src/deployment.js Outdated Show resolved Hide resolved
src/deployment.js Show resolved Hide resolved
@jeremy-daley-kr
Copy link

@jeremy-daley-kr Can you give this another try? I think I've worked out the kinks now. 🤞🏻 😅

All Green on my end! Boom! 🤜💥🤛

Copy link

@jeremy-daley-kr jeremy-daley-kr left a comment

Choose a reason for hiding this comment

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

Excellent work, and thank you!

@JamesMGreene
Copy link
Contributor Author

JamesMGreene commented Mar 8, 2023

@jeremy-daley-kr Awwwwwesome! 🎉

I'll work out the last few issues that my teammates have called out and try to get this shipped later today. 🚀

src/api-client.js Outdated Show resolved Hide resolved
@JamesMGreene
Copy link
Contributor Author

Was able to use this branch to successfully deploy all of our Pages starter workflow regression testing repos. 👍🏻

@JamesMGreene JamesMGreene merged commit 497da40 into main Mar 9, 2023
@JamesMGreene JamesMGreene deleted the actions-http-client branch March 9, 2023 20:33
@JamesMGreene
Copy link
Contributor Author

JamesMGreene commented Mar 9, 2023

Published as part of the v1.2.5 release! 🚀

Any of the following uses statements should work:

uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1.2.5
uses: actions/deploy-pages@497da40f5225e762159b457c9ae5d6f75a136f5c

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.

Needs proxy support
4 participants