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

Minimize repo clones #64

Merged
merged 3 commits into from
Feb 21, 2020
Merged

Minimize repo clones #64

merged 3 commits into from
Feb 21, 2020

Conversation

christopher-dG
Copy link
Member

With these changes, the repo isn't cloned if there are no new versions.

I'm currently looking at eliminating the clone for "new" releases that have already been handled by TagBot, but it's a bit tougher.

@christopher-dG
Copy link
Member Author

There, now we should only ever clone when actually making a release.

@christopher-dG
Copy link
Member Author

christopher-dG commented Feb 20, 2020

So this does work, but I've been looking into how the "official" actions/checkout does their cloning, and they do a more complex version of:

git init
git remote add origin ...
git fetch origin
git checkout <branch>

Presumably this doesn't add to the clone counter? I might give this a try, I think it would be nicer this way. Working with the local repo is a lot less error-prone than doing stuff over the network.

@christopher-dG
Copy link
Member Author

I'm like 95% sure that this will avoid updating the clone graphs. I did a little experiment on a repo of my own, whenever GitHub updates the graphs I'll know for sure. This is definitely 500x simpler than the other solution.

@christopher-dG
Copy link
Member Author

christopher-dG commented Feb 21, 2020

Rats... the fetch also counts as a clone. Even actions/checkout registers a clone. Back to using the API for as much as possible.

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.

1 participant