diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index ba8634629..ce662f24d 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -158,7 +158,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController filepath: ".gitea/workflows/#{@pipeline.pipeline_name}.yml", branch: @pipeline.branch, new_branch: @pipeline.branch, - content: Base64.encode64(@pipeline.yaml).gsub(/\n/, ''), + content: opt == "create" ? Base64.encode64(@pipeline.yaml).gsub(/\n/, '') : @pipeline.yaml, message: "#{opt} pipeline", committer: { email: current_user.mail, diff --git a/app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb b/app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb index 149d7a6be..d25705687 100644 --- a/app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb +++ b/app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb @@ -9,10 +9,10 @@ on: <% node.input_values.each_key do |key| %> <%=key %>: <% if node.input_values[key].blank? %> - - * + - * <% else %> <% node.input_values[key].to_s.split(",").each do |val| %> - - <%=val %> + - <%=val %> <% end %> <% end %> <% end %>