Skip to content

[CTORNDGAIN-1178] Add script existence checks before chmod in CI workflows#52

Open
github-actions[bot] wants to merge 1 commit intomainfrom
feature/ctorndgain-1178-script-existence-checks
Open

[CTORNDGAIN-1178] Add script existence checks before chmod in CI workflows#52
github-actions[bot] wants to merge 1 commit intomainfrom
feature/ctorndgain-1178-script-existence-checks

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 9, 2026

Jira: https://griddynamics.atlassian.net/browse/CTORNDGAIN-1178

Summary

  • Adds [ -f <script> ] || { echo "::error::..."; exit 1; } guard before every chmod +x in CI workflows
  • Affects publish-ims-mcp.yml (2 chmod calls) and validate-test-cases.yml (1 chmod call)
  • Guards produce a clear GitHub Actions error annotation and a non-zero exit when the script is missing, instead of silently running chmod on a nonexistent path

Testing notes

  • All three target scripts (validate-types.sh, ims-mcp-server/build.sh, .github/scripts/run-test-cases.sh) are already committed with mode 100755, so the guards will not affect normal CI runs
  • The guard pattern [ -f <file> ] || { echo "::error::..."; exit 1; } is POSIX sh-compatible and works on ubuntu-latest

Assumptions

None — script paths are already tracked in git and existence is deterministic.

CI Workflow Changes (Manual)

⚠️ These changes must be applied manually to .github/workflows/ because the CI token cannot push workflow files.

.github/workflows/publish-ims-mcp.yml

     - name: Run type validation
       run: |
+        [ -f validate-types.sh ] || { echo "::error::validate-types.sh not found"; exit 1; }
         chmod +x validate-types.sh
         ./validate-types.sh

     - name: Build package
       working-directory: ./ims-mcp-server
       run: |
         # V2: bootstrap.md no longer bundled (loaded from Rosetta Server at startup)
+        [ -f build.sh ] || { echo "::error::build.sh not found"; exit 1; }
         chmod +x build.sh
         ./build.sh

.github/workflows/validate-test-cases.yml

         run: |
           echo "Running test cases for changed prompts..."
+          [ -f .github/scripts/run-test-cases.sh ] || { echo "::error::.github/scripts/run-test-cases.sh not found"; exit 1; }
           chmod +x .github/scripts/run-test-cases.sh
           .github/scripts/run-test-cases.sh

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot requested a review from isolomatov-gd as a code owner April 9, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants