Skip to content

Instantly share code, notes, and snippets.

@efossas
Created July 4, 2022 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save efossas/8541c6ed649a67ee882f10dbce040226 to your computer and use it in GitHub Desktop.
Save efossas/8541c6ed649a67ee882f10dbce040226 to your computer and use it in GitHub Desktop.
Github Job Outputs
# so many steps to share a value 🙁
# set-output command -> internal key name -> output key name -> needs on next job -> handlebars (not portable)
jobs:
setup:
runs-on: ubuntu-latest
outputs:
key-name-alt: ${{ steps.set-value.outputs.key-name }}
steps:
- id: set-value
run: echo "::set-output name=key-name::value-goes-here"
execute:
runs-on: ubuntu-latest
needs: setup
steps:
- run: export MY_VAR="${{needs.setup.outputs.key-name-alt}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment