用于创建
agolang
GitHub Actions工作流中没有转义特殊字符的模板文件。对heredoc使用不同的分隔符,以防止解释特殊字符。您可以使用EOF或另一个带引号的分隔符来实现这一点。试试下面的方法,它将是正确的。
- name: Create the template
shell: bash
run: |
cat <<'EOF' > myfile.tpl
{{- if . }}
{{- range . }}
<h3>Target <code>{{ escapeXML .Target }}</code></h3>
{{- if (eq (len .Vulnerabilities) 0) }}
<h4>No Vulnerabilities found</h4>
.
.
{{- end }}
{{- end }}
EOF