From 22f543417fb63e5b4f15d1b089a18588ebfec9aa Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Mon, 16 Dec 2024 11:05:15 -0300 Subject: [PATCH] Trigger windows e2e-tests if windows file changes Signed-off-by: Arthur Silva Sens --- .github/workflows/e2e-tests-windows.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e-tests-windows.yml b/.github/workflows/e2e-tests-windows.yml index 0cfee2e4788c..4aae99140d3f 100644 --- a/.github/workflows/e2e-tests-windows.yml +++ b/.github/workflows/e2e-tests-windows.yml @@ -19,20 +19,18 @@ env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 jobs: - get-changed-files: + windows-file-changed: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Get changed files - id: get_changed_files - run: echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})" - - name: Print changed files - run: echo "${{ steps.get_changed_files.outputs.files }}" + - name: Did windows files changed + run: echo "changed=$(./.github/workflows/scripts/is_changed_file_windows.sh)" >> "$GITHUB_OUTPUT" collector-build: runs-on: windows-latest - if: ${{ github.actor != 'dependabot[bot]' && (contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') }} + needs: [windows-file-changed] + if: ${{ github.actor != 'dependabot[bot]' && ((contains(github.event.pull_request.labels.*.name, 'Run Windows') || github.event_name == 'push' || github.event_name == 'merge_group') || needs.windows-file-changed.outputs.changed == 'true') }} steps: - name: Checkout uses: actions/checkout@v4