Skip to content

Workflow Logic Test

Workflow Logic Test #2

name: Workflow Logic Test
run-name: Workflow Logic Test
on:
workflow_dispatch:
permissions:
contents: read # This is required for actions/checkout
jobs:
job1:
name: Job 1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
job2:
name: Job 2
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fail
run: exit 1
job3:
name: Job 3
runs-on: ubuntu-latest
needs: [job1, job2]
if: ${{ always() }}
steps:
- name: Checkout
uses: actions/checkout@v4
job4:
name: Job 4
runs-on: ubuntu-latest
needs: job3
if: ${{ success() }}
steps:
- name: Checkout
uses: actions/checkout@v4