From a7f8bd5c90928d02e98c25a672d80916c6f5f786 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Wed, 20 Dec 2023 19:05:07 -0800 Subject: [PATCH] Move the change list step up Signed-off-by: Ryan Liang --- .github/workflows/lint.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 595dc55a40..063f5f4b5d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,6 +19,16 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 path: pull-request-checkout + + - name: Get list of changed files + id: files + run: | + BASE_SHA="${{ github.event.pull_request.base.sha }}" + HEAD_SHA="${{ github.event.pull_request.head.sha }}" + git fetch origin $BASE_SHA + git diff --name-only $BASE_SHA...$HEAD_SHA > changed_files.txt + CHANGED_FILES=$(cat changed_files.txt | grep -E '\.(js|ts|tsx)$' || true) + echo "::set-output name=changed::${CHANGED_FILES}" - name: Checkout OpenSearch Dashboards uses: actions/checkout@v2 @@ -56,16 +66,6 @@ jobs: working-directory: OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }} run: yarn osd bootstrap - - - name: Get list of changed files - id: files - run: | - BASE_SHA="${{ github.event.pull_request.base.sha }}" - HEAD_SHA="${{ github.event.pull_request.head.sha }}" - git fetch origin $BASE_SHA - git diff --name-only $BASE_SHA...$HEAD_SHA > changed_files.txt - CHANGED_FILES=$(cat changed_files.txt | grep -E '\.(js|ts|tsx)$' || true) - echo "::set-output name=changed::${CHANGED_FILES}" - name: Lint Changed Files run: |