Added documentation about support for outputs 📄
This commit is contained in:
parent
4c5eef8dc2
commit
3208510c3f
1 changed files with 16 additions and 0 deletions
16
README.md
16
README.md
|
@ -58,3 +58,19 @@
|
|||
echo "first line"
|
||||
echo "second line"
|
||||
```
|
||||
|
||||
#### Capture Output from a Docker Container
|
||||
|
||||
You can capture output from the container, using the `::set-output` [workflow command](https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions) in GitHub Actions.
|
||||
Steps that execute following this step can access the output using the `${{ steps.<step_id>.outputs.<output_name> }}` syntax.
|
||||
For more information, see the [Contexts documentation](https://docs.github.com/en/actions/learn-github-actions/contexts) for GitHub Actions.
|
||||
|
||||
```yaml
|
||||
- uses: pcgeek86/docker-run-action@v4
|
||||
id: container_test
|
||||
with:
|
||||
image: mcr.microsoft.com/powershell
|
||||
run: |
|
||||
pwsh -EncodedCommand JABJAG4AcwB0AGEAbABsAGUAZABNAG8AZAB1AGwAZQBzACAAPQAgACgARwBlAHQALQBNAG8AZAB1AGwAZQAgAC0ATABpAHMAdABBAHYAYQBpAGwAYQBiAGwAZQApAC4ATgBhAG0AZQAgAC0AagBvAGkAbgAgACcALAAnAAoAJwA6ADoAcwBlAHQALQBvAHUAdABwAHUAdAAgAG4AYQBtAGUAPQBjAG8AbgB0AGEAaQBuAGUAcgBfAG8AdQB0AHAAdQB0ADoAOgB7ADAAfQAnACAALQBmACAAJABJAG4AcwB0AGEAbABsAGUAZABNAG8AZAB1AGwAZQBzAA==
|
||||
- run: echo "Installed PowerShell modules are: ${{ steps.container_test.outputs.container_output }}"
|
||||
```
|
||||
|
|
Reference in a new issue