cabal
cabal copied to clipboard
How to use static alpine job for testing
I have a PR in which I wanted to download the artifact from the static alpine job for testing:
https://github.com/haskell/cabal/actions/runs/9205673028/job/25321848983?pr=9900
The job is finished but I can't work out how to download the artifact. Could someone tell me how this job is supposed to be used?
cc @TeofilC
I believe it's (somewhat) documented in the readme: https://github.com/haskell/cabal/blob/master/README.md#preview-releases
Even more cutting-edge binaries built from pull requests are always available from the Validate worklow page on GitHub, at the very bottom of the page, or from the build-alpine workflow for statically linked Linux builds.
It's not super precise but it's implied, I think, that the whole Validate workflow has to finish for artifacts to become available.
Take any recent Validate workflow page (e.g. this one): you'll find the artifacts at the very bottom of the page, just like the README says. But on the Validate workflow page for your PR they have not appeared yet.
The Github actions UX is horrible for this IMO.
From your link (https://github.com/haskell/cabal/actions/runs/9205673028/job/25321848983?pr=9900). You would click Summary on the left sidebar, then scroll all the way down to the bottom and the artifacts are there.
You can also download artifacts via the REST API, but that requires authentication: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-workflow-run-artifacts
It's worth mentioning that you can download GH action artifact via https://nightly.link without dealing with API authentication.
The gh CLI also offers a quick way to do this.
# Download all artifacts generated by a workflow run
$ gh run download <run-id>
# Download a specific artifact within a run
$ gh run download <run-id> -n <name>
# Download specific artifacts across all runs in a repository
$ gh run download -n <name1> -n <name2>
# Select artifacts to download interactively
$ gh run download
@mpickering Do you think we need to add documentation about this? What would be the appropriate place?