mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
fix(actions): keep folded block scalars intact across serialization (#39787)
Folded (`>`) scalars in workflows gained blank lines and had spaces turned into newlines every time Gitea re-serialized a job. This bumps go-yaml to its main branch and drops our workarounds. The runner gets the same change in https://gitea.com/gitea/runner/pulls/1321. - go-yaml main fixes the accumulating blank lines (https://github.com/yaml/go-yaml/pull/366) and the block scalar indentation indicators (https://github.com/yaml/go-yaml/pull/414), so `BlockSafeString` and the folded scalar requoting go away - The job encoder no longer wraps lines, because go-yaml still wraps more-indented lines of folded scalars and turns a space into a newline - The fix applies to folded scalars anywhere in a workflow, including workflow-level `env` Fixes https://github.com/go-gitea/gitea/issues/39775 Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
1 parent
078198d38d
commit
c1ae4ec29e
7 files changed
+72
-59
No files matched your search
@@ -7,5 +7,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: extract_tag
|
||||
name: "\nExtract tag for variant"
|
||||
run: "\necho Test\n"
|
||||
name: |-
|
||||
|
||||
Extract tag for variant
|
||||
run: |
|
||||
|
||||
echo Test
|
||||
Reference in new issue
Block a user