Navigation Menu

Skip to content

Workflow_run completed event triggered by failed workflow #26238

Answered by BrightRan
cuporter asked this question in Actions
Discussion options

You must be logged in to vote

@cuporter,

Currently, there are only the two types requested and completed for the workflow_run event.

As a workaround, you can use the expression “github.event.workflow_run.conclusion” to get the result of the previous workflow run, and use the job 's if conditional to skip all the job in the current workflow run when the previous workflow run is not success.

name: Production deploy
on:
  workflow_run:
    workflows: ["Stage deploy"]
    types:
      - completed

jobs:
job1:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

job2:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

. . .

jobN:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

Of course, you…

Replies: 14 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mstmustisnt
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment