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 7aed38a
Show file tree
Hide file tree
Showing 4 changed files with 22 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
19 changes: 19 additions & 0 deletions .github/workflows/matrix-prep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Read config from matrix.json

on:
push:
branches:
- '*'

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 7aed38a

Please sign in to comment.