-
Notifications
You must be signed in to change notification settings - Fork 7
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
[QT-687] Rewrite packaging action #18
Conversation
This is a proposal for a possible v2 of this action. It makes the following changes * Rewrite to run as a composite action instead of Docker action. We do this for two primary reasons: * Building the action for every packing workflow is slow. Depending on the runner this could be anywhere from 15 seconds to a minute. This is work that we need not do on every packaging workflow. * It relies on the Docker hub which often throws 429 errors in packaging workflows. * Use upstream build artifacts instead of building nPFM from source * We still require Github with this method but instead of compiling the binary from source we install the pre-built artifact. * We no longer depends on Kyle's branch which was already a bit of a security risk since he's no longer employed at HashiCorp and we're not pinning to a Git SHA. (The bug fix in his branch was fixed upstream already [0]) Because of the new change in implementation we also consider: * Whether or not to install Go for the template generator. This allows callers to set up their own Go toolchain if the want. * Add testing for this Go behavior. * Add new inputs for nFPM version and installation path. If we can assume that this workflow was only ever run on Linux or macOS runners then it should be fully backwards compatible. If not, it will not work on windows at this time. [0] https://github.com/goreleaser/nfpm/blob/main/deb/deb_test.go#L217 Signed-off-by: Ryan Cragun <[email protected]>
action.yml
Outdated
INPUT_LICENSE: ${{ inputs.license }} | ||
INPUT_DEPENDS: ${{ inputs.depends }} | ||
INPUT_BINARY: ${{ inputs.binary }} | ||
INPUT_BIN_PATH: ${{ inputs.bin_path }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the INPUT_BIN_PATH
? I'm comparing it to the list of inputs from the README and this looks like it's new.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied it directly from the previous docker vars and missed that it was no longer necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually wrong, it's used by the template generator to set the package destination. I fixed it in my latest commit.
Signed-off-by: Ryan Cragun <[email protected]>
A quick(ish) GitHub search only shows it being used from these contexts, I think we're good on that front and don't need a major version bump. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Ryan!
Signed-off-by: Ryan Cragun <[email protected]>
I cleaned it up and tested in my fork: https://github.com/ryancragun/actions-packaging-linux/actions/runs/8288284520 |
@shore / @jeanneryan Any chance we can get this merged (but not tagged) so I can start testing it in Vault? As long we don't update the tag I wouldn't expect it to have much downstream impact unless people are using |
done! |
This is a proposal for a possible v2 of this action. It makes the following changes
Because of the new change in implementation we also consider:
If we can assume that this workflow was only ever run on Linux or macOS runners then it should be fully backwards compatible. If not, it will not work on windows at this time.
[0] https://github.com/goreleaser/nfpm/blob/main/deb/deb_test.go#L217