diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index dc50671335a68..78ffe1c61846f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3839,6 +3839,7 @@ runs.no_runs = The workflow has no runs yet. runs.empty_commit_message = (empty commit message) runs.expire_log_message = Logs have been purged because they were too old. runs.delete = Delete workflow run +runs.cancel = Cancel workflow run runs.delete.description = Are you sure you want to permanently delete this workflow run? This action cannot be undone. runs.not_done = This workflow run is not done. runs.view_workflow_file = View workflow file diff --git a/routers/web/repo/actions/actions.go b/routers/web/repo/actions/actions.go index 7f219811bdc71..202da407d298b 100644 --- a/routers/web/repo/actions/actions.go +++ b/routers/web/repo/actions/actions.go @@ -318,7 +318,7 @@ func prepareWorkflowList(ctx *context.Context, workflows []Workflow) { ctx.Data["Page"] = pager ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0 - ctx.Data["AllowDeleteWorkflowRuns"] = ctx.Repo.CanWrite(unit.TypeActions) + ctx.Data["CanWriteRepoUnitActions"] = ctx.Repo.CanWrite(unit.TypeActions) } // loadIsRefDeleted loads the IsRefDeleted field for each run in the list. diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index fdb631f0eea05..23df61a43c634 100644 --- a/templates/repo/actions/runs_list.tmpl +++ b/templates/repo/actions/runs_list.tmpl @@ -40,7 +40,12 @@ {{svg "octicon-kebab-horizontal"}}