Anirban166 / Autocomment-atime-results

GitHub Action that automatically comments a plot and other atime-based results on PRs
https://github.com/marketplace/actions/autocomment-atime-results
0 stars 1 forks source link

Uploading the output of atime::atime_pkg and having a link to the generated artifact #17

Closed Anirban166 closed 8 months ago

Anirban166 commented 8 months ago

I'll be using this thread to document and discuss the part of using upload-artifact to create downloadable artifacts, the contents of which consist of the data.table/inst/atime/ folder as generated after a successful run of atime::atime_pkg within my workflow.

I initially tested the step with compression-level set to 9 (highest for Zlib as can be specified for upload-artifact) in case artifact sizes were large (was a known issue with atime and @DorisAmoakohene encountered that earlier while using Siyao's action), but it seems the default works well too now (artifact size was in kilobytes for two small test cases put under test.list).

Anirban166 commented 8 months ago

After some reading, I saw that the latest version of upload-artifact (v4) allows for artifacts to be identifiable within a workflow (after their generation and uploading of course, with a reference to that step).

Given that the action's API can now create an artifact ID that is available within the succeeding steps of the workflow, I can use it to construct the URL to that specific artifact for one to download directly.

Here are the release notes, and to quote from that release in December last year:

Artifacts will be scoped to a job rather than a workflow. This allows the artifact to become immediately available to download from the API after being uploaded, which was not possible before.