ci(check-examples): only run on source change (#1356)
* ci(check-examples): only run on source change * ci(check-examples): simulate source change * ci(check-examples): fix expression * ci(check-examples): simulate source change * ci(check-examples): test change against files * ci(check-examples): adjust expression * ci(check-examples): remove quotes * ci(check-examples): use from json * ci(check-examples): set output value * ci(check-examples): remove simulated change
This commit is contained in:
parent
e6590c7d31
commit
55613c9a31
|
@ -14,6 +14,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
source_changed: ${{ steps.set-source-changed.outputs.source_changed }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -34,9 +35,36 @@ jobs:
|
||||||
echo "Example Directories: $examples"
|
echo "Example Directories: $examples"
|
||||||
echo "matrix={\"directory\":$examples}" >> "$GITHUB_OUTPUT"
|
echo "matrix={\"directory\":$examples}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- 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:
|
matrix-job:
|
||||||
name: Check
|
name: Check
|
||||||
needs: [setup]
|
needs: [setup]
|
||||||
|
if: needs.setup.outputs.source_changed == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
|
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
Loading…
Reference in New Issue