re: <https://github.com/cloudposse/github-action-a...
# github-actions
j
re: https://github.com/cloudposse/github-action-atmos-affected-trigger-spacelift. can we get an update so it cancels old plans on feature branches? Context: • push a PR (commit
abc
) • Action triggers 20 stacks • push a commit before those stacks finish planning (commit
def
• Action triggers 20 stacks You'll now have up to 40 stacks (depending how fast it was triggered) and commit
abc
is irrelevant now. We want to just verify
def
(the latest). Thoughts?
d
That's already supported by Spacelift natively. You can enable new runs for the same stack to cancel all previous runs
TLDR automatically cancel all queued runs if newer run is triggered for a given stack
d
yeah our policy has specific conditions for cancelling runs, but you can configure that to whatever you need of course
ie only cancel runs for the same PR, on plans, and if they're in the Queued state (not in progress)
j
but will it work the same if you're squashing commits?
d
I believe yes. Since the pull request head branch is still the same, it should match the conditions
Copy code
run.branch == input.pull_request.head.branch
but tbf you should try it, and let me know if it works for you
j
ok..sounds good