Skip to content

Instantly share code, notes, and snippets.

@weibeld
Created August 2, 2020 11:25
Show Gist options
  • Save weibeld/b8db6a1201ca54d33d6b35147a0c5509 to your computer and use it in GitHub Desktop.
Save weibeld/b8db6a1201ca54d33d6b35147a0c5509 to your computer and use it in GitHub Desktop.
GitHub Actions example workflow — Outputs 2
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 }}"
@vorporeal
Copy link

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