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

Upload to charmhub branches for all cases, not just for git branches named /branch/... #13

Open
ca-scribner opened this issue Jan 13, 2022 · 3 comments
Labels

Comments

@ca-scribner
Copy link
Contributor

Rather than selectively uploading intermediate work to charmhub branches (eg: latest/edge/someBranch), we could upload all PR updates to charmhub. charmhub branches are ephemeral (ttl=30day) anyway so it won't make too much garbage, and this way we can easily test deployments.

There might be some logic that needs working through as we still need to know the destination track/channel that the branch should go to, but this could be the same as we currently use (if git branch is called /track/..., push to charmhub at /track/edge/branchName, else push to latest/edge/branchname)

@simskij
Copy link
Member

simskij commented Apr 16, 2022

Yeah, this change makes sense to me!

@ca-scribner
Copy link
Contributor Author

If there's any worry about always publishing to branches, a compromise would be an optional upload-to-branch-label argument (or something with a better name). If set, then the action would only upload to branches if the PR has that label (this way PRs can opt-in to branch publishing when it is needed). If unset, then the action would always publish to a branch

@simskij
Copy link
Member

simskij commented May 10, 2022

I think it's fine without that extra precaution as remote PRs won't have access to secrets and hence will fail, so to have this work, repos that want to publish to branches will have to enforce a feature branch based workflow rather than forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants