<!DOCTYPE html>
<html>
<head>
	<style>
		.footer { font-size:small; color:#666;}
	</style>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

{{$repo_link := HTMLFormat "<a href='%s'>%s</a>" .Run.Repo.HTMLURL .RepoFullName}}
{{$action_run_link := HTMLFormat "<a href='%s'>%s</a>" .Link .Run.Title}}
{{$trigger_user_link := HTMLFormat "<a href='%s'>@%s</a>" .Run.TriggerUser.HTMLURL .Run.TriggerUser.Name}}
<body>
	<p>
		{{if .IsSuccess}}
			{{.locale.Tr "mail.actions.successful_run_after_failure" $action_run_link $repo_link}}
		{{else}}
			{{.locale.Tr "mail.actions.not_successful_run" $action_run_link $repo_link}}
		{{end}}

		<br />

		{{.locale.Tr "mail.actions.run_info_cur_status" .Run.Status .PriorStatus}}<br />
		{{.locale.Tr "mail.actions.run_info_sha" .CommitSHA}}<br />
		{{if .LastRun}}
			{{.locale.Tr "mail.actions.run_info_previous_status" .LastRun.Status}}<br />
		{{end}}
		{{.locale.Tr "mail.actions.run_info_trigger" .Run.TriggerEvent $trigger_user_link}}
	</p>
	<div class="footer">
		<p>
			---
			<br>
			<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
		</p>
	</div>
</body>
</html>
