ci: Fix for the junit run-result cache saving issue (#29529)

## Description
Currently, when we run the server build without tests, we still try to
check the cache for run-result, but as the cache is not present during
the first run, where we just build the server, and on the success of the
workflow, actions/cache create the cache with the specified key,

Which is creating an issue while we try to save the actual run-result
cache when we run the tests in server-unit-tests.

Solution : 
- Added a condition to check the cache present only while running tests

#### Type of change
- Workflow changes (server-build.yml)
## Testing
- Workflow run

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated the server build process to conditionally skip certain steps
based on user input.

- **Chores**
  - Improved automation in the build workflow to enhance efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saroj 2023-12-12 14:05:34 +05:30 committed by GitHub
parent 6e8bfc63fb
commit 25508563fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,7 @@ jobs:
# In case this is second attempt try restoring status of the prior attempt from cache
- name: Restore the previous run result
if: inputs.skip-tests != 'true'
id: cache-appsmith
uses: actions/cache@v3
with: