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 }}"
@timoteialbu
Copy link

"::set-output" is supposed to still work, but its deprecated. Blog post about how to migrate, which is essentially @mraarif's answer above: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment