surge-preview-tools: introduce a new domain-managed
output
#100
Labels
enhancement
New feature or request
domain-managed
output
#100
Currently, the
domain-exist
output has a wrong semantic. It states if the domain is managed by the surge token passed to the action whereas its name implicitly refers to the public availability of the domainQuote from the ouput description in
action.yml
I suggest we introduce a new output for what the current
domain-exist
stores to clarify:domain-exist
would now state if the domain is publicly available.The new output would be about what the surge token manages
true
if the domain referenced by thepreview-url
exists and is managed by the surge account related to thesurge-token
.false
otherwise, in particular the domain was created with another surge account.Would it be a breaking change?
Theoretically, yes, but in practice, this output is not used AFAIK. It is used internally in the action code to detect if the surge-action or surge CLI should be run and set the
can-run-surge-command
output.can-run-surge-command
is the output that is actually used in workflows.Interest for knowing if the domain exists i.e. is publicly available
Sometimes, the surge-preview action in charge of the actual deploy fails but the error is not detected by the workflow (even when setting the
failOnError
input) like in process-analytics/bpmn-visualization-R#128 (comment)To verify that the deployment is up and was correctly done (at least for the initial one), users could run surge-preview-tools after surge-preview and fail the workflow if the
domain-exist
output isfalse
.Possible implementation
Do a simple fetch and check the status code.
Depending on how surge handles domains
The text was updated successfully, but these errors were encountered: