From aae04fa0d81520638542cceb335a3a19264641a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Mon, 16 Sep 2024 11:18:18 +0200 Subject: [PATCH] Workaround non-run CI for required workflow --- .github/workflows/ci.yml | 4 ++-- .github/workflows/test.yml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bd616b..2f7ed1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,17 +31,17 @@ jobs: run: | changed=$(ct list-changed --config config.yaml) if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT + echo "changed=true" >> "$GITHUB_OUTPUT" fi test: name: Test - if: needs.prepare.outputs.changed == 'true' needs: - prepare uses: ./.github/workflows/test.yml with: action-matrix: '["lint", "install", "install --upgrade"]' + contains-changes: ${{ needs.prepare.outputs.changed == 'true' }} release: name: Release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd8898f..231d097 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,11 +11,17 @@ on: default: '["install"]' type: string description: Matrix of actions to run + contains-changes: + required: false + default: true + type: boolean + description: The ref contains changes requiring tests jobs: ct: name: Run chart-testing runs-on: ubuntu-latest + if: inputs.contains-changes strategy: fail-fast: false matrix: