If condition on block or job #25980
-
Hello! I’m fairly new to the whole actions :slight_smile: and I’ve got some questions.
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @joanofdart, Glad to see you in Github Community Forum! To answer your queries:
joanofdart:
Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the
In this example,
joanofdart:
Jobs are executed on individual VM, you can transfer the variable value to the next job which needs the previous one.
joanofdart:
The if expression can be defined in step or job level, it only affects the step or job where it defines, not affect the next step or jobs.
Workflow syntax for GitHub Actions - GitHub Docsstep level:
Workflow syntax for GitHub Actions - GitHub DocsHope it clear and helpful! |
Beta Was this translation helpful? Give feedback.
-
Hey @weide-zhou Thank you so much for replying. Best wishes! |
Beta Was this translation helpful? Give feedback.
-
Thanks @joanofdart for your reply, glad to know it’s helpful. Cheers! |
Beta Was this translation helpful? Give feedback.
Hi @joanofdart,
Glad to see you in Github Community Forum!
To answer your queries:
Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the
jobs.<job_id>.needs
keyword. For example:In this example,
job1
must complete successfully beforejob2
begins, if job1 fails, the job2 will not begin.Jobs are executed on individual VM, you can transfer the variable value to the next job which needs the previous…