| 1 | {{ define "page" -}} |
| 2 | {{ template "repo-header" . }} |
| 3 | <section class="shithub-actions-run-page"> |
| 4 | <header class="shithub-actions-run-head"> |
| 5 | <div> |
| 6 | <a href="{{ .Run.ActionsHref }}" class="shithub-actions-back">{{ octicon "workflow" }} {{ .Run.Title }}</a> |
| 7 | <h1> |
| 8 | <span class="shithub-actions-state shithub-actions-state-{{ .Run.StateClass }}">{{ octicon .Run.StateIcon }}</span> |
| 9 | {{ .Run.Title }} <span>#{{ .Run.RunIndex }}</span> |
| 10 | </h1> |
| 11 | <p> |
| 12 | Triggered via {{ .Run.EventLabel }} |
| 13 | {{ if .Run.ActorUsername }}by <a href="/{{ .Run.ActorUsername }}">{{ .Run.ActorUsername }}</a>{{ end }} |
| 14 | for <a href="/{{ .Owner }}/{{ .Repo.Name }}/commit/{{ .Run.HeadSha }}"><code>{{ .Run.HeadShaShort }}</code></a> |
| 15 | {{ if .Run.HeadRef }}on <a class="shithub-branch-name" href="/{{ .Owner }}/{{ .Repo.Name }}/tree/{{ .Run.HeadRef }}">{{ .Run.HeadRef }}</a>{{ end }} |
| 16 | {{ if .Run.ParentRunHref }} · re-run of <a href="{{ .Run.ParentRunHref }}">#{{ .Run.ParentRunIndex }}</a>{{ end }} |
| 17 | </p> |
| 18 | </div> |
| 19 | <div class="shithub-actions-run-head-actions"> |
| 20 | {{ template "action-run-status" . }} |
| 21 | {{ if .Run.CanRerun }} |
| 22 | <form method="POST" action="{{ .Run.RerunHref }}" class="shithub-actions-inline-form"> |
| 23 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 24 | <button type="submit" class="shithub-button">{{ octicon "history" }} Re-run jobs</button> |
| 25 | </form> |
| 26 | {{ end }} |
| 27 | {{ if and .Run.ApprovalPending .Run.CanApprove }} |
| 28 | <form method="POST" action="{{ .Run.ApproveHref }}" class="shithub-actions-inline-form"> |
| 29 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 30 | <button type="submit" class="shithub-button shithub-button-primary">{{ octicon "check" }} Approve and run</button> |
| 31 | </form> |
| 32 | <form method="POST" action="{{ .Run.RejectHref }}" class="shithub-actions-inline-form"> |
| 33 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 34 | <button type="submit" class="shithub-button shithub-button-danger">{{ octicon "x" }} Reject</button> |
| 35 | </form> |
| 36 | {{ end }} |
| 37 | {{ if .Run.CanCancel }} |
| 38 | <form method="POST" action="{{ .Run.CancelHref }}" class="shithub-actions-inline-form"> |
| 39 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 40 | <button type="submit" class="shithub-button shithub-button-danger">{{ octicon "stop" }} Cancel workflow</button> |
| 41 | </form> |
| 42 | {{ end }} |
| 43 | <a class="shithub-button" href="{{ .Run.CodeHref }}">{{ octicon "code" }} Code</a> |
| 44 | </div> |
| 45 | </header> |
| 46 | |
| 47 | <div class="shithub-actions-run-layout"> |
| 48 | <aside class="shithub-actions-sidebar shithub-actions-run-sidebar" aria-label="Run navigation"> |
| 49 | <a href="#summary" class="shithub-actions-nav-item is-active" aria-current="page">{{ octicon "home" }} <span>Summary</span></a> |
| 50 | <div class="shithub-actions-sidebar-section"> |
| 51 | <h2>Jobs</h2> |
| 52 | {{ range .Run.Jobs }} |
| 53 | <a href="#{{ .Anchor }}" class="shithub-actions-nav-item"> |
| 54 | <span class="shithub-actions-state shithub-actions-state-{{ .StateClass }}">{{ octicon .StateIcon }}</span> |
| 55 | <span>{{ .Name }}</span> |
| 56 | </a> |
| 57 | {{ else }} |
| 58 | <p>No jobs were created for this run.</p> |
| 59 | {{ end }} |
| 60 | </div> |
| 61 | <div class="shithub-actions-sidebar-section"> |
| 62 | <h2>Run details</h2> |
| 63 | <span class="shithub-actions-nav-item">{{ octicon "file" }} <span>{{ .Run.WorkflowFile }}</span></span> |
| 64 | </div> |
| 65 | </aside> |
| 66 | |
| 67 | <div class="shithub-actions-run-main"> |
| 68 | {{ if .Run.ApprovalPending }} |
| 69 | <section class="shithub-actions-approval-box"> |
| 70 | <strong>{{ octicon "clock" }} Waiting for approval</strong> |
| 71 | <p>{{ if .Run.ApprovalReason }}{{ .Run.ApprovalReason }}{{ else }}This workflow is paused until a maintainer approves it.{{ end }}</p> |
| 72 | </section> |
| 73 | {{ else if .Run.ApprovalRejected }} |
| 74 | <section class="shithub-actions-approval-box"> |
| 75 | <strong>{{ octicon "x-circle" }} Workflow rejected</strong> |
| 76 | <p>This run was not dispatched to a runner.</p> |
| 77 | </section> |
| 78 | {{ end }} |
| 79 | |
| 80 | <section id="summary" class="shithub-actions-summary-strip"> |
| 81 | <div> |
| 82 | <span>Triggered via</span> |
| 83 | <strong>{{ .Run.EventLabel }}</strong> |
| 84 | </div> |
| 85 | <div> |
| 86 | <span>Status</span> |
| 87 | <strong class="shithub-actions-state-{{ .Run.StateClass }}">{{ .Run.StateText }}</strong> |
| 88 | </div> |
| 89 | <div> |
| 90 | <span>Total duration</span> |
| 91 | <strong>{{ .Run.Duration }}</strong> |
| 92 | </div> |
| 93 | <div> |
| 94 | <span>Artifacts</span> |
| 95 | <strong>{{ .Run.ArtifactCount }}</strong> |
| 96 | </div> |
| 97 | </section> |
| 98 | |
| 99 | <section class="shithub-actions-workflow-card"> |
| 100 | <header> |
| 101 | <div> |
| 102 | <h2>{{ .Run.WorkflowFile }}</h2> |
| 103 | <p>{{ .Run.CompletedCount }} of {{ .Run.JobCount }} jobs finished{{ if .Run.FailureCount }} · {{ .Run.FailureCount }} failed{{ end }}</p> |
| 104 | </div> |
| 105 | </header> |
| 106 | {{ if .Run.Jobs }} |
| 107 | <div class="shithub-actions-workflow-graph" aria-label="Workflow job graph"> |
| 108 | <div class="shithub-actions-workflow-stages"> |
| 109 | {{ range .Run.Stages }} |
| 110 | <div class="shithub-actions-workflow-stage"> |
| 111 | {{ range .Jobs }} |
| 112 | <a href="#{{ .Anchor }}" class="shithub-actions-job-card"> |
| 113 | <span class="shithub-actions-state shithub-actions-state-{{ .StateClass }}">{{ octicon .StateIcon }}</span> |
| 114 | <strong>{{ .Name }}</strong> |
| 115 | <span>{{ .Duration }}</span> |
| 116 | {{ if .NeedsText }}<small>needs {{ .NeedsText }}</small>{{ end }} |
| 117 | </a> |
| 118 | {{ end }} |
| 119 | </div> |
| 120 | {{ end }} |
| 121 | </div> |
| 122 | </div> |
| 123 | {{ else }} |
| 124 | <div class="shithub-actions-empty shithub-actions-empty-compact"> |
| 125 | <h2>No jobs</h2> |
| 126 | <p>This workflow run has not materialized any jobs yet.</p> |
| 127 | </div> |
| 128 | {{ end }} |
| 129 | </section> |
| 130 | |
| 131 | <section class="shithub-actions-jobs" aria-label="Workflow jobs"> |
| 132 | {{ range .Run.Jobs }} |
| 133 | <details id="{{ .Anchor }}" class="shithub-actions-job-detail" open> |
| 134 | <summary> |
| 135 | <span class="shithub-actions-state shithub-actions-state-{{ .StateClass }}">{{ octicon .StateIcon }}</span> |
| 136 | <span> |
| 137 | <strong>{{ .Name }}</strong> |
| 138 | <small>{{ .StateText }} · {{ .Duration }}{{ if .RunsOn }} · runs-on {{ .RunsOn }}{{ end }}{{ if .NeedsText }} · needs {{ .NeedsText }}{{ end }}</small> |
| 139 | </span> |
| 140 | </summary> |
| 141 | {{ if or .CanCancel .CancelRequested }} |
| 142 | <div class="shithub-actions-job-actions"> |
| 143 | {{ if .CanCancel }} |
| 144 | <form method="POST" action="{{ .CancelHref }}" class="shithub-actions-inline-form"> |
| 145 | <input type="hidden" name="csrf_token" value="{{ $.CSRFToken }}"> |
| 146 | <button type="submit" class="shithub-button shithub-button-danger">{{ octicon "stop" }} Cancel job</button> |
| 147 | </form> |
| 148 | {{ else if .CancelRequested }} |
| 149 | <span class="shithub-actions-cancel-requested">{{ octicon "stopwatch" }} Cancel requested</span> |
| 150 | {{ end }} |
| 151 | </div> |
| 152 | {{ end }} |
| 153 | {{ if .WaitReason }} |
| 154 | <div class="shithub-actions-wait-reason">{{ octicon "clock" }} {{ .WaitReason }}</div> |
| 155 | {{ end }} |
| 156 | <ol class="shithub-actions-step-list"> |
| 157 | {{ range .Steps }} |
| 158 | <li> |
| 159 | <a href="{{ .LogHref }}" class="shithub-actions-step-row"> |
| 160 | <span class="shithub-actions-state shithub-actions-state-{{ .StateClass }}">{{ octicon .StateIcon }}</span> |
| 161 | <span> |
| 162 | <strong>{{ .Name }}</strong> |
| 163 | {{ if .Detail }}<small>{{ .Kind }} · {{ .Detail }}</small>{{ else }}<small>{{ .Kind }}</small>{{ end }} |
| 164 | </span> |
| 165 | <span>{{ .Duration }}</span> |
| 166 | </a> |
| 167 | </li> |
| 168 | {{ else }} |
| 169 | <li class="shithub-actions-step-empty">No steps were created for this job.</li> |
| 170 | {{ end }} |
| 171 | </ol> |
| 172 | </details> |
| 173 | {{ end }} |
| 174 | </section> |
| 175 | </div> |
| 176 | </div> |
| 177 | </section> |
| 178 | {{- end }} |