Fix yaml with prefixed newline broken setjob + yaml v4 (#144)

* go-yaml v3 **and** v4 workaround
* avoid yaml.Marshal broken indention

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/144
Reviewed-by: wxiaoguang <[email protected]>
Reviewed-by: Zettat123 <[email protected]>
Co-authored-by: Christopher Homberger <[email protected]>
Co-committed-by: Christopher Homberger <[email protected]>
This commit is contained in:
Christopher HombergerandLunny Xiao authored and Lunny Xiao committed 2025-12-09 02:28:56 +00:00
1 parent 5417d3ac67
commit 3a07d231a0
20 files changed
+62 -23

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
name: Step with leading new line
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "\nExtract tag for variant"
id: extract_tag
run: |
echo Test
+15
View File
@@ -0,0 +1,15 @@
name: Step with leading new line
"on":
push:
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- id: extract_tag
name: |2-
Extract tag for variant
run: |2
echo Test