We are doing a proof of concept of looking into Github Actions for producing an artifact for a given commit for a legacy system, which we then need to process further in-house so I am looking into how we can do that relatively simply for now to demonstrate that this can work. We are fine with the zip wrapping.
Sample URL for such an artifact as identified by right-clicking on the Artifact in the job page in Actions: https://github.com/tandeday/actions-artifacts/suites/1767549169/artifacts/33720037
I understand that there is a full API for this, and I have successfully used this by hand to localize and download the artifact using a line similar to:
curl -O -J -L -H 'Authorization: token ...' -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/tandeday/actions-artifacts/actions/artifacts/33720037/zip
I would like to be able to avoid creating an API client for this proof-of-concept, but instead allow the user to just pass in the link from the web page, but I have been unable to locate a simple way to do so.
So question is, how do I with a minimum of coding come from https://github.com/tandeday/actions-artifacts/suites/1767549169/artifacts/33720037 to https://api.github.com/repos/tandeday/actions-artifacts/actions/artifacts/33720037/zip ?