Merge pull request #12808 from thalesmg/ci-fix-emqx-app-matrix-m-20240328
ci(fix): skip flow when there are no changes
This commit is contained in:
commit
abdd86c398
|
@ -35,6 +35,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.matrix.outputs.matrix }}
|
matrix: ${{ steps.matrix.outputs.matrix }}
|
||||||
|
skip: ${{ steps.matrix.outputs.skip }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
||||||
with:
|
with:
|
||||||
|
@ -49,12 +50,16 @@ jobs:
|
||||||
changed_files="$(git diff --name-only ${BEFORE_REF} ${AFTER_REF} apps/emqx)"
|
changed_files="$(git diff --name-only ${BEFORE_REF} ${AFTER_REF} apps/emqx)"
|
||||||
if [ "$changed_files" = '' ]; then
|
if [ "$changed_files" = '' ]; then
|
||||||
echo "nothing changed in apps/emqx, ignored."
|
echo "nothing changed in apps/emqx, ignored."
|
||||||
echo "matrix=[]" | tee -a $GITHUB_OUTPUT
|
echo 'matrix=[]' | tee -a $GITHUB_OUTPUT
|
||||||
|
echo 'skip=true' | tee -a $GITHUB_OUTPUT
|
||||||
exit 0
|
exit 0
|
||||||
|
else
|
||||||
|
echo 'skip=false' | tee -a $GITHUB_OUTPUT
|
||||||
|
echo 'matrix=[{"type": "eunit_proper_and_static"},{"type": "1_3"},{"type": "2_3"},{"type": "3_3"}]' | tee -a $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
echo 'matrix=[{"type": "eunit_proper_and_static"},{"type": "1_3"},{"type": "2_3"},{"type": "3_3"}]' | tee -a $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
run_emqx_app_tests:
|
run_emqx_app_tests:
|
||||||
|
if: needs.prepare_matrix.outputs.skip != 'true'
|
||||||
needs:
|
needs:
|
||||||
- prepare_matrix
|
- prepare_matrix
|
||||||
runs-on: ${{ endsWith(github.repository, '/emqx') && 'ubuntu-22.04' || fromJSON('["self-hosted","ephemeral","linux","x64"]') }}
|
runs-on: ${{ endsWith(github.repository, '/emqx') && 'ubuntu-22.04' || fromJSON('["self-hosted","ephemeral","linux","x64"]') }}
|
||||||
|
|
Loading…
Reference in New Issue