Monorepo for Tangled tangled.org
856
fork

Configure Feed

Select the types of activity you want to include in your feed.

proposal : spindle : conditional step execution #208

open opened by jobala.tngl.sh

Overview#

This issue proposes adding an if condition to a step such that the step only runs when the condition is true.

Why#

Consider the scenario where I want to publish a blog to some hosting provider like Netlify or Vercel using a Git based workflow. When I add a new post through a PR, I would like to have the article published to a preview url for me to get a sense of its look and feel and then only publish the article to my main site on merging to main. At the moment, this is possible on spindle by having two workflows one for publishing the preview and another for publishing to the main site.

This scenario can be simplified by introducing conditional step execution; such that the publishing to main site step only runs when the PR is merged to main. For other similar scenarios having conditional step execution can reduce pressure on compute infrastructure since a single workflow will be sufficient instead of having multiple workflows run in parallel.

Implementation Plan#

  1. Add support for if in the step schema
  2. Check if the specified condition is true during step execution
  3. Add support for a skipped status kind
[deleted by author]

That makes sense, the scenario is covered with shell scripts + env vars. Closing the issue.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:qcqdzn5ohjxyp2ilrunon6kn/sh.tangled.repo.issue/3mh3mb7uk3m22