Created
August 2, 2020 11:25
-
-
Save weibeld/b8db6a1201ca54d33d6b35147a0c5509 to your computer and use it in GitHub Desktop.
GitHub Actions example workflow — Outputs 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: outputs-2 | |
on: workflow_dispatch | |
jobs: | |
my-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: step-1 | |
id: xyz | |
run: echo "::set-output name=ip-address::$(curl -s ifconfig.me)" | |
- name: step-2 | |
run: echo "${{ steps.xyz.outputs.ip-address }}" |
For people finding this: "::set-output" does work within a script; you don't have to put it in the action YAML. (It's possible GitHub has changed something since the comment above saying the opposite, but I just tried it and it worked for me.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
maybe set the value as an environment variable
and access it, anywhere using