diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a597897..5f23e4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,9 +57,9 @@ jobs: job-2: + if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest needs: [ job-1 ] - if: ${{ success() || failure() }} steps: - name: step-1 from job-2 run: | @@ -71,6 +71,13 @@ jobs: echo Hello from job-2, step-2 echo "env-var=:${{ env.TEST_UNIT_COVERAGE_IS_COMPLIANT }}:" + job-3: + runs-on: ubuntu-latest + needs: [ job-2 ] + steps: + - name: step-1 from job-3 + run: | + echo Hello from job-3, step-1 # plain exit-42 on job-1,step-1 and success()||failure() on job-1,step-2 means