Skip to content

CI CD Optimisation - Cancel in-progress builds on update #8713

@linear

Description

@linear

e.g.

When engineers make a change that triggers, autofix, danger or codeql-analysis, these build if running will keep building previous runs.

We can cancel these builds to allow only new update version of code to run in these builds.

Change

Add the following to autofix.ci.yml, danger.yml and codeql-analysis.yml files

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

Test

  • Raise a PR with these changes. Builds should these update github workflow steps within the same PR. Also these builds should trigger and start running
  • While they are running, push up a change (e.g. whitespace)
  • Confirm that the existing running builds cancel
  • Confirm that new builds trigger for the white space change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions