Use prod syncer image #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |