Skip to content

Commit

Permalink
fixup! ci: only build templates that changed
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Sep 11, 2024
1 parent eab69fb commit 3b6b40e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
build-on-main:
name: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.templates.outputs.allTemplates != '' && toJson(fromjson(needs.templates.outputs.allTemplates)) != '[]') }}
needs: templates
runs-on: ubuntu-latest
strategy:
Expand All @@ -58,14 +59,14 @@ jobs:
run: cartesi doctor

- name: Build on main
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.templates.outputs.allTemplates != '' && toJson(fromjson(needs.templates.outputs.allTemplates)) != '[]') }}
run: |
cartesi build
cartesi hash
working-directory: ${{ matrix.allTemplates }}

build-on-pr:
name: build
if: ${{ github.event_name == 'pull_request' && (needs.templates.outputs.changedTemplates != '' && toJson(fromjson(needs.templates.outputs.changedTemplates)) != '[]') }}
needs: templates
runs-on: ubuntu-latest
strategy:
Expand All @@ -91,7 +92,6 @@ jobs:
run: cartesi doctor

- name: Build on PR
if: ${{ github.event_name == 'pull_request' && (needs.templates.outputs.changedTemplates != '' && toJson(fromjson(needs.templates.outputs.changedTemplates)) != '[]') }}
run: |
cartesi build
cartesi hash
Expand Down

0 comments on commit 3b6b40e

Please sign in to comment.