Skip to content

Commit

Permalink
Update test.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
zepeng811 authored Aug 31, 2023
1 parent 33533e0 commit 1a1cadf
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
name: test-workflow
on: [push]

name: build
on: push
jobs:
job1:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Some job step that provides an output
id: step1
run: echo "::set-output name=output1::output-thing"
- id: set-matrix
run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
job2:
needs: job1
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.job1.outputs.matrix)}}
steps:
- name: Get output
run: |
echo "The output: ${{ needs.job1.outputs.output1 }}"
- run: build

0 comments on commit 1a1cadf

Please sign in to comment.