From 94768bd47bf40029433e9c0924e8c9627798204b Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Wed, 27 Nov 2024 16:47:32 +0530 Subject: [PATCH] fix: Reverted changes for skip client cache (#37782) ## Description Added command for migration Fixes # https://app.zenhub.com/workspaces/stability-pod-6690c4814e31602e25cab7fd/issues/gh/appsmithorg/appsmith/37768 ## Automation /ok-to-test tags="" ### :mag: Cypress test results > [!CAUTION] > If you modify the content in this section, you are likely to disrupt the CI result for your PR. ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **Chores** - Enhanced the client build workflow for improved detection of modified files. - Streamlined conditions for executing build steps based on file changes. - Refined caching mechanisms for Yarn and build artifacts. - Improved handling of Git LFS commands in the build process. --- .github/workflows/client-build.yml | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/client-build.yml b/.github/workflows/client-build.yml index 64162384e54..a801b59da56 100644 --- a/.github/workflows/client-build.yml +++ b/.github/workflows/client-build.yml @@ -66,23 +66,23 @@ jobs: with: fetch-tags: true - # - name: Get changed files in the client folder - # id: changed-files-specific - # uses: tj-actions/changed-files@v41 - # with: - # files: "app/client/**" - - - name: Updating the client changed file variable + - name: Get changed files in the client folder id: changed-files-specific - run: echo "any_changed=true" >> "$GITHUB_OUTPUT" + uses: tj-actions/changed-files@v41 + with: + files: "app/client/**" - #- name: Run step if any file(s) in the client folder change - # if: steps.changed-files-specific.outputs.any_changed == 'true' - # env: - # ALL_CHANGED_FILES: ${{ steps.changed-files-specific.outputs.all_changed_files }} - # run: | - # echo "One or more files in the server folder has changed." - # echo "List all the files that have changed: $ALL_CHANGED_FILES" + # - name: Updating the client changed file variable + # id: changed-files-specific + # run: echo "any_changed=true" >> "$GITHUB_OUTPUT" + + - name: Run step if any file(s) in the client folder change + if: steps.changed-files-specific.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed-files-specific.outputs.all_changed_files }} + run: | + echo "One or more files in the server folder has changed." + echo "List all the files that have changed: $ALL_CHANGED_FILES" - name: Check compliance if: inputs.pr != 0 && steps.changed-files-specific.outputs.any_changed == 'true' @@ -209,11 +209,11 @@ jobs: git config --global user.email "$gituseremail" git config --global user.name "$gituser" git clone https://$cachetoken@github.com/appsmithorg/cibuildcache.git - git lfs install - git lfs migrate import --everything --yes if [ "$reponame" = "appsmith" ]; then export repodir="CE"; fi if [ "$reponame" = "appsmith-ee" ]; then export repodir="EE"; fi cd cibuildcache/$repodir/release/client + git lfs install + git lfs migrate import --everything --yes git lfs pull ./build.tar mv ./build.tar ../../../../../build.tar