Skip to content

How to avoid multiple workflow runs triggered from dependency update on monorepo? #3178

@hitsumabushi845

Description

@hitsumabushi845

Question

We'd like to avoid the situation that the terraform plan workflow is triggered multiply on dependency update PRs.
Is there some solution for that?

Such situation will not occur if it can aggregate checksum file updates for single commit, but it is hard to implement because each environment is separated and commits independently on each environment.
As of my investigation, GitHub Action's concurrency option is useful to prevent multiple workflow runs, but it records multiple canceled workflow histories.

Background

We're constructing terraform-monorepo to maintain multiple product infrastructures.
Its toolsets are managed by aqua, and using aqua.update-checksum.enabled: true option.

Based on such situation, when all of aqua.yaml are updated by renovate and update PR is created, CI runs terraform plan or/and tfaction/setup on all products/environments.
After that, each products/environments updates aqua-checksum.json and push it.

Each commits are separated for each products/environments, so the CI will run multiply but most of those are failed due to the commit that the workflow watches is stale.

Note

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions