Skip to content

Instantly share code, notes, and snippets.

@JJ
Last active December 5, 2019 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JJ/2ff154927de0905a78e7a0fd95106d9f to your computer and use it in GitHub Desktop.
Save JJ/2ff154927de0905a78e7a0fd95106d9f to your computer and use it in GitHub Desktop.
Gist for the Raku Advent Calendar: using step results in GitHub actions
name: "One step up"
on: [push]
jobs:
seasonal_greetings:
runs-on: ubuntu-latest
steps:
- name: Pre-Merry Xmas!
env:
greeting: "Merry"
season: "Xmas"
run: |
sentence="$greeting $season!"
echo ::set-env name=SENTENCE::$sentence
- name: Greet
id: greet
run: |
output=$(python -c "import os; print(os.environ['SENTENCE'])")
echo ::set-output name=printd::$output
- name: Run Ruby
env:
OUTPUT: ${{ steps.greet.outputs.printd }}
run: /opt/hostedtoolcache/Ruby/2.6.3/x64/bin/ruby -e "puts ENV['OUTPUT']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment