{% macro show_action(action, first = false) %}
  • {% if first %}
    {% else %}
    {% endif %} {{ action["name_prefix"] | e }} {{ action["name"] | e}} {% if action["may_fail"] %} {% if action["exit_code"] != 0 %} failure: {{ action["may_fail"] }} {% else %} tainted ({{ action["may_fail"] }}) {% endif %} {% elif action["primary_output"] %} {% if action["exit_code"] != 0 %} failed to build: {{ action["primary_output"] | e }} {% else %} build: {{ action["primary_output"] | e }} {% endif %} {% endif %}
      {% if action["stdout"] %}
    • stdout: {{action["stdout"] | e }}
    • {% endif %} {% if action["stderr"] %}
    • stderr: {{action["stderr"] | e }}
    • {% endif %} {% if action["cmd"] %}
    • command {{ action["cmd"] | e }}
    • {% endif %} {% if action["origins"] %}
    • origins
        {% for origin in action["origins"] %}
      • {{ origin | e }}
      • {% endfor %}
    • {% endif %} {% if action["duration"] %}
    • duration: {{ action["duration"] | e }}
    • {% endif %} {% if action["cached"] %}
    • cached: {{ action["cached"] | e }}
    • {% endif %} {% if action["exit_code"] != 0 %}
    • exit code: {{ action["exit_code"] }}
    • {% endif %} {% if action["output"] %}
    • output
        {% for out in action["output"] %} {% if action["artifacts"].get(out) %}
      • {{ out | e }} [↓]
      • {% else %}
      • {{ out | e }}
      • {% endif %} {% endfor %}
    • {% endif %} {% if action["output_dirs"] %}
    • output directories
        {% for out in action["output_dirs"] %} {% if action["artifacts"].get(out) %}
      • {{ out | e }}
      • {% else %}
      • {{ out | e }}
      • {% endif %} {% endfor %}
    • {% endif %}
  • {% endmacro %}