chore: upload individual binaries as artifacts #3714
Merged
+56
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a workflow job that uploads the built snapshot binaries as workflow artifacts, as can be seen by following the workflow links to the summary in this PR itself.
As written, the artifacts are compressed without any intermediary folders, so downloading darwin-build_darwin_amd64_v1 is a zip file directly containing the
syft
binary, though one that is not notorized. To me, this seems more convenient than having intermediate directories likesnapshot/build_darwin_amd64_v1/syft
orbuild_darwin_amd64_v1/syft
.It is a separate job so it should not affect the overall workflow run times since it runs concurrently with other jobs that take longer. It only downloads the artifacts from cache, and uploads them as workflow artifacts. This seems a little odd, but there may be a performance difference in uploading to the cache vs the workflow: 4 vs ~13 seconds serially or an added ~7 seconds to
npm install @actions/artifact
. It may be worth revisiting this later to simply upload the workflow artifacts and forgo the cache now that it is possible to download workflow artifacts during the same workflow, but I don't think that is necessary to accomplish the main goal of having the snapshots available for testing.Type of change