Skip to content

Commit

Permalink
Move matrix-prep to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
ladisgin committed Nov 25, 2021
1 parent e823943 commit ee1a40d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 30 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/build-utbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ on:

jobs:
matrix-prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Read config from matrix.json
uses: actions/checkout@v2
- id: set-matrix
run: |
TASKS=$(echo $(cat .github/workflows/matrix.json) | sed 's/ //g' )
echo "::set-output name=matrix::$TASKS"
uses: ${{ $GITHUB_REPOSITORY }}.github/workflows/matrix-prep.yaml@${{ $GITHUB_SHA }}

build:
needs: matrix-prep
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/matrix-prep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build UTBot and run unit tests

jobs:
matrix-prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Read config from matrix.json
uses: actions/checkout@v2
- id: set-matrix
run: |
TASKS=$(echo $(cat .github/workflows/matrix.json) | sed 's/ //g' )
echo "::set-output name=matrix::$TASKS"
11 changes: 1 addition & 10 deletions .github/workflows/publish-base-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,7 @@ env:

jobs:
matrix-prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Read config from matrix.json
uses: actions/checkout@v2
- id: set-matrix
run: |
TASKS=$(echo $(cat .github/workflows/matrix.json) | sed 's/ //g' )
echo "::set-output name=matrix::$TASKS"
uses: ${{ $GITHUB_REPOSITORY }}.github/workflows/matrix-prep.yaml@${{ $GITHUB_SHA }}

build-docker:
needs: matrix-prep
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/publish-utbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ on:

jobs:
matrix-prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Read config from matrix.json
uses: actions/checkout@v2
- id: set-matrix
run: |
TASKS=$(echo $(cat .github/workflows/matrix.json) | sed 's/ //g' )
echo "::set-output name=matrix::$TASKS"
uses: ${{ $GITHUB_REPOSITORY }}.github/workflows/matrix-prep.yaml@${{ $GITHUB_SHA }}

publish:
needs: matrix-prep
Expand Down

0 comments on commit ee1a40d

Please sign in to comment.