convictional / trigger-workflow-and-wait

Trigger a workflow in another (or same) repository and wait for the job to finish.
MIT License
321 stars 153 forks source link

Cannot see actual status of downstream job #8

Open kaborso opened 3 years ago

kaborso commented 3 years ago

The propagate_failure option does not account for other statuses returned by the downstream job, so the action only returns failure or success. The conclusion environment variable holds the actual status reported by the downstream job. I propose exporting it as an output from the action for use in subsequent steps that may need to respond to whether the job timed out, was skipped, was cancelled, and so on.

ArminazK commented 1 year ago

hi, this would be really usefull if some implements. Thanks

Enrico-Infrinity commented 1 year ago

I have created this PR:

https://github.com/convictional/trigger-workflow-and-wait/pull/85

It's solving the problem of the "conclusion" variable in the $GITHUB_OUTPUT.

You can try my first release, it's a fork of this repo, like this:

steps:
  - name: 'Run test'
    id: 'run-test'
    uses: Enrico-Infrinity/trigger-workflow-and-wait@v1.0
    with:
      owner: remoteOwner
      repo: remoteRepo
      github_token: ${{ secrets.CICD_REPO_TOKEN }}
      workflow_file_name: main.yml
      ref: main
      wait_interval: 10
      client_payload: '{}'
      propagate_failure: false
      trigger_workflow: true
      wait_workflow: true

  - name: 'Set result'
    run: |
      echo ${{ steps.run-test.outputs.conclusion }}

If someone here can do a review of my PR, maybe we can get something official and stable :)

santinogue commented 2 months ago

could we get this PR merged @Enrico-Infrinity ??