Skip to content

Use prod syncer image #2

Use prod syncer image

Use prod syncer image #2

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
failed-job:
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.step1.outputs.test }}
steps:
- name: failed-step-with-output
run: |
echo "This job will always fail"
echo "test=hello" >> "$GITHUB_OUTPUT"
exit 1
dependent-job:
runs-on: ubuntu-latest
needs: failed-job
if: ${{ always() }}
steps:
- name: dependent-step
run: echo "This job is dependent on failed-job"
dependent-job-2:
runs-on: ubuntu-latest
needs: failed-job
if: ${{ always() }}
steps:
- name: dependent-step
if: ${{ needs.failed-job.outputs.output1 == 'hello' }}
run: echo "This job is dependent on failed-job"
dependent-job-3:
runs-on: ubuntu-latest
needs: failed-job
if: ${{ always() && needs.failed-job.outputs.output1 == 'hello' }}
steps:
- name: dependent-step
run: echo "This job is dependent on failed-job"
dependent-job-4:
runs-on: ubuntu-latest
needs: failed-job
if: ${{ always() }}
steps:
- name: dependent-step
if: ${{ needs.failed-job.result == 'failed' }}
run: |
echo "This job should fail"
exit 1
- name: this-not-fail
run: echo "do not fail"