Skip to content

Support subsequent commits triggering a preview #35

@lukqw

Description

@lukqw

Context

When triggering a preview deployment of your repository, while one is already live, the action will fail with an error

API response: {"error": true, "message": "compute.already_exists"}

This is because an instance with the name already exists, due to the previous commit triggering a deployment.

Instead of erroring, the action should shut down the old one, and create a new one. (Thought: maybe this could be configurable? I.e. replace-old-preview as an argument?)

Another thought to consider: What if I have two PRs in two repos with the same number at the same time - the current naming strategy would end up generating preview-1 and preview-1 across both repos.
Maybe there's another way we can prevent these naming collisions in the first place?

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