From e6590c7d3171d0ce0383aae60f91789c9912aba3 Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Sat, 15 Jul 2023 19:09:33 -0400 Subject: [PATCH] ci(ci): only run on source change (#1357) * ci(ci): only run on source change * ci(ci): simulate source change * ci(ci): remove simulated source change --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6660aa38d..b8bb789ab0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,45 @@ on: - main jobs: + setup: + name: Detect Changes + runs-on: ubuntu-latest + outputs: + source_changed: ${{ steps.set-source-changed.outputs.source_changed }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get source files that changed + id: changed-source + uses: tj-actions/changed-files@v36 + with: + files: | + integrations + leptos + leptos_config + leptos_dom + leptos_hot_reload + leptos_macro + leptos_reactive + leptos_server + meta + router + server_fn + server_fn_macro + + - name: List source files that changed + run: echo '${{ steps.changed-source.outputs.all_changed_files }}' + + - name: Set source_changed + id: set-source-changed + run: | + echo "source_changed=${{ steps.changed-source.outputs.any_changed }}" >> "$GITHUB_OUTPUT" + matrix-job: name: CI + needs: [setup] + if: needs.setup.outputs.source_changed == 'true' strategy: matrix: directory: