Last active
December 5, 2019 17:14
-
-
Save JJ/2ff154927de0905a78e7a0fd95106d9f to your computer and use it in GitHub Desktop.
Gist for the Raku Advent Calendar: using step results in GitHub actions
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: "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