Skip to content

Commit

Permalink
test outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Aug 28, 2024
1 parent eca879d commit 741dfb0
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/actions-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,29 @@ jobs:
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
make-output:
runs-on: ubuntu-latest
outputs:
output_1: ${{ steps.gen_output.outputs.output_1 }}
output_2: ${{ steps.gen_output.outputs.output_2 }}
output_3: ${{ steps.gen_output.outputs.output_3 }}
strategy:
matrix:
version: [1, 2, 3]
steps:
- name: Generate output
id: gen_output
run: |
version="${{ matrix.version }}"
echo "output_${version}=${version}" >> "$GITHUB_OUTPUT"
use-output:
runs-on: ubuntu-latest
needs: [make-output]
steps:
# Will show
# {
# "output_1": "1",
# "output_2": "2",
# "output_3": "3"
# }
- run: echo '${{ toJSON(needs.make-output.outputs) }}'

0 comments on commit 741dfb0

Please sign in to comment.