I am trying to learn deployment using github actions and SFDX CLI. Now there is a step where I would like to call force:source:deploy command to validate the code that will be deployed in sandbox like below.

run: |
  echo ${{env.APEX_TESTS}}
  sfdx force:source:deploy -p "changed-sources/force-app" --checkonly --testlevel RunSpecifiedTests --runtests ${{env.APEX_TESTS}} --json

This works absolutely fine. But I would like to get the Json response of this command, find the error or success message based on the output, percentage of test coverage, get other details like the deployment Id, and then do something like updating the PR comment by appending the success or error message. How can I do that? Or is there any plugin which does the same?


You must log in to answer this question.

Browse other questions tagged .