You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/actions/reference/workflow-syntax-for-github-actions.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,20 @@ The jobs in this example run sequentially:
270
270
2. `job2`
271
271
3. `job3`
272
272
273
+
Here is an example of using a [conditional statement](https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions):
274
+
275
+
````yaml
276
+
jobs:
277
+
job1:
278
+
job2:
279
+
needs: job1
280
+
job3:
281
+
if: always()
282
+
needs: [job1, job2]
283
+
```
284
+
285
+
``job3`will run after `job1` and `job2` whether `job1` and `job2` are successful or not.
286
+
273
287
### **`jobs.<job_id>.runs-on`**
274
288
275
289
**Required** The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner.
0 commit comments