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

cache actions on premises and download from .com #381

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

ericsciple
Copy link
Collaborator

@ericsciple ericsciple commented Mar 22, 2020

This PR enables downloading actions for GHES alpha. The goal is actions/checkout works in GHES alpha.

For alpha only, the following changes

  • Remove auth header when downloading actions from github.com
  • Do not clear the actions cache between jobs (avoid rate limiting for unauthenticated requests)

For beta, a different solution will be used (actions shipped in box).

@actions actions deleted a comment from TingluoHuang Mar 23, 2020
@bryanmacfarlane
Copy link
Member

We might need to also not supply the token in this case. Not sure. We know that not having a token from dotcom will rate limit us (anonymous). However, if we supply the wrong token (the one from ghes), the first request might fail.

@ericsciple ericsciple changed the title [draft] cache actions on premises [draft] cache actions on premises and download from .com Mar 23, 2020
@ericsciple ericsciple force-pushed the users/ericsciple/m168cache branch from add9e7d to 31b8628 Compare March 24, 2020 22:44
if (!string.IsNullOrEmpty(authToken))
var configurationStore = HostContext.GetService<IConfigurationStore>();
var isHostedServer = configurationStore.GetSettings().IsHostedServer;
if (isHostedServer)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the diff looks bad, but adding auth header just moved inside if block

@ericsciple ericsciple changed the title [draft] cache actions on premises and download from .com cache actions on premises and download from .com Mar 24, 2020
@ericsciple ericsciple merged commit dff1024 into master Mar 25, 2020
@ericsciple ericsciple deleted the users/ericsciple/m168cache branch March 25, 2020 01:51
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
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.

3 participants