-
Notifications
You must be signed in to change notification settings - Fork 137
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 go-githubactions #153
Comments
Do we need this dependency? If we can easily implement the same,let's avoid adding yet another dependency to manage. In general, in the builder, we should minimize dependencies as much as possible. Wdut? |
go-githubactions depends only on go-envconfig which has essentially no dependencies so transients should be minimal. I'd kind of prefer using it because it would require a lot of manual code to get context from env vars and it pretty much does exactly what we want. It also does a couple other things nicely like dealing with newlines when writing output commands. |
It's also @sethvargo so I'm reasonably confident in the management of both packages. |
I'll look a bit more into how the |
@sethvargo? Never heard of 'em 😄 |
I may have been wrong about Seth's reliability. 😆 |
I'm going to close this in favor of #164 |
+1, one less dependency to main and be worried about |
https://github.com/sethvargo/go-githubactions does a lot of the same stuff as the
github
package but does many things better.For example, it gets github context values via the built-in environment variables rather than requiring it be serialized to json and added to a
GITHUB_CONTEXT
environment variable. This is desirable because thegithub
context doesn't seem to be available inside of anactions.yml
so it can't be used by reusable actions.Open issues:
GITHUB_EVENT_PATH
method work inside reusable workflows? - YesGithubContext
needs a way to get the repository. (Add support for all GITHUB env vars sethvargo/go-githubactions#46)GithubContext
that are present in our version. Some of these fields we may not be using but some others may need to be added. (Add support for all GITHUB env vars sethvargo/go-githubactions#46)ref_type
base_ref
head_ref
run_attempt
The text was updated successfully, but these errors were encountered: