admin管理员组

文章数量:1122826

In composite actions, I can use status functions to add a condifion to some steps, e.g. if: success() or if: failure().

I need post action, and I can't add post to composite actions. That's why I decided to use JS actions.

But how can I check, in that action, if it's success or failure? If I use post-if, I will be able to execute some statements only when it's successful or failed. E.g.:

runs:
  using: 'node20'
  main: 'dist/index.js'
  post: 'dist/post.js'
  post-if: success()

How can I execute different post statements in case of success or failure? E.g. sending some notifications to 3rd-party services. Can I get this status from post.js?

本文标签: githubSuccess or failure for JavaScript actionsStack Overflow