Skip to content

Commit a2dd70e

Browse files
committed
Revert "feat: remove header.yml.j2"
This reverts commit 85612c5.
1 parent 1f242d5 commit a2dd70e

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

roles/github/templates/generic.yml.j2

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,7 @@
1111
<%- if github_environment_selector == 'single' -%>
1212
<%- set _ = github_kayobe_arguments.update({"KAYOBE_ENVIRONMENT": github_kayobe_environments | first}) -%>
1313
<%- endif -%>
14-
name: %% format_file_name(workflow.file_name, is_title=true) %%
15-
16-
on:
17-
<%- if workflow.trigger is defined +%>
18-
<%- for trigger_name in workflow.trigger.keys() +%>
19-
<%- if trigger_name == 'schedule' +%>
20-
schedule:
21-
- cron: '%% workflow.trigger['schedule']['cron'] %%'
22-
<%- elif trigger_name == 'workflow_dispatch' +%>
23-
workflow_dispatch:
24-
<%- if workflow.trigger['workflow_dispatch'] is not none +%>
25-
inputs:
26-
%% workflow.trigger['workflow_dispatch'] | flatten | join('') | indent(6) | trim %%
27-
<%- if github_environment_selector == 'input' +%>
28-
%% github_kayobe_environment_input | flatten | join('') | indent(6) | trim %%
29-
<%- endif +%>
30-
<%- endif +%>
31-
<%- endif +%>
32-
<%- endfor +%>
33-
<%- endif +%>
14+
<% include "header.yml.j2" +%>
3415

3516
jobs:
3617
prepare-runner:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: %% format_file_name(workflow.file_name, is_title=true) %%
2+
3+
on:
4+
<%- if workflow.trigger is defined +%>
5+
<%- for trigger_name in workflow.trigger.keys() +%>
6+
<%- if trigger_name == 'schedule' +%>
7+
schedule:
8+
- cron: '%% workflow.trigger['schedule']['cron'] %%'
9+
<%- elif trigger_name == 'workflow_dispatch' +%>
10+
workflow_dispatch:
11+
<%- if workflow.trigger['workflow_dispatch'] is not none +%>
12+
inputs:
13+
%% workflow.trigger['workflow_dispatch'] | flatten | join('') | indent(6) | trim %%
14+
<%- if github_environment_selector == 'input' +%>
15+
%% github_kayobe_environment_input | flatten | join('') | indent(6) | trim %%
16+
<%- endif +%>
17+
<%- endif +%>
18+
<%- endif +%>
19+
<%- endfor +%>
20+
<%- endif +%>

0 commit comments

Comments
 (0)