I need to capture some output from a Docker build-push step, and use that output in future steps. My
Dockerfile calls a PowerShell script. Somewhere inside this PowerShell script, I need to “send” some output back to my GitHub Actions workflow.
What is the best way to accomplish this?
- I have already tried setting the
GITHUB_ENVenvironment variable inside the container build, which didn’t work. In the PowerShell build script, I tried:
- I have also tried using the special syntax to set a workflow output, using the GitHub Actions Toolkit. That also did not work.
- I looked into using the
/github/workspacedirectory, but that is only mounted for container runs, not container builds using
Bottom line is, how do I get some simple string data from inside the container image build, and expose that to my GitHub Actions workflow?