2

As per Share artifacts between workflows / Github Actions , the API is now available for retrieval of the artifacts, but how would you use this in a real world scenario?

Our business case is that we run a deploy to test - workflow that also persists the artifact for the current workflow, since this is using different jobs in the workflow.

Our goal is then to re-use this artifact if the test is OK, thus promoting it to production rather than re-building the code.

The API allows for download of run artifacts, but our concern is that we are struggling to find an elegant way to pass the run/artifact id from the original workflow to the one that handles the actual deploy.

1 Answer 1

1

I solved this by using a custom action:

https://github.com/marketplace/actions/download-workflow-artifact

I had already used the original commit hash for the initial build action, so re-using it here based on triggers for the same commit was relatively straight forward.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.