Skip to content

Cancel auto merge if required Job is skipped #118802

Answered by oerp-odoo
oerp-odoo asked this question in Actions
Discussion options

You must be logged in to vote

Went with extra job that explicitly forces failure. Though that job must be always run (both of those jobs are set as required via status checks):

  # This is a dummy job, to just wait for all tests to pass. This way
  # we can specify single required status check instead of needing to
  # specify all projects (which is kind of dynamic).
  test_aggregate_success:
    runs-on: [self-hosted, pool]
    needs: odoo
    steps:
      - name: Pass
        run: echo "Tests Passed"
  test_aggregate_fail:
    runs-on: [self-hosted, pool]
    needs: odoo
    if: |
      always() &&
      contains(needs.*.result, 'failure') ||
      contains(needs.*.result, 'cancelled')
    steps:
      - uses: actio…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@grandmas-favorite
Comment options

Answer selected by oerp-odoo

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question
3 participants