Skip to content

How do I specify job dependency running in another workflow? #26632

Answered by brpaz
rn4n asked this question in Actions
Discussion options

You must be logged in to vote

You cant.

What you can do is to use the same workflow file and then use conditions to trigger or not a specific job.

If you want to run a job only when there is a push to master branch you can do it like this:

jobs:
   deploy:
       if: github.event_name == 'push' && github.ref == 'refs/heads/master'

Another option for deployments is to create a tag when you are ready to deploy and then having a seperate workflow that is listening to the push tag event and trigger your deploy.

Replies: 15 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@daveisfera
Comment options

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet