mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Sort out windows CRLF mess
This commit is contained in:
4
.github/workflows/pr-checks.yml
vendored
4
.github/workflows/pr-checks.yml
vendored
@@ -26,6 +26,10 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
|
||||
steps:
|
||||
- name: Prepare git (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: git config --global core.autocrlf false
|
||||
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Node.js
|
||||
|
||||
@@ -240,7 +240,7 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
|
||||
})
|
||||
|
||||
raw_file = this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml.raw"
|
||||
with open(raw_file, 'w') as output_stream:
|
||||
with open(raw_file, 'w', newline='\n') as output_stream:
|
||||
writeHeader(output_stream)
|
||||
yaml.dump({
|
||||
'name': f"PR Check - {checkSpecification['name']}",
|
||||
@@ -274,7 +274,7 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
|
||||
}, output_stream)
|
||||
|
||||
with open(raw_file, 'r') as input_stream:
|
||||
with open(this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml", 'w') as output_stream:
|
||||
with open(this_dir.parent / ".github" / "workflows" / f"__{checkName}.yml", 'w', newline='\n') as output_stream:
|
||||
content = input_stream.read()
|
||||
output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+['']))
|
||||
os.remove(raw_file)
|
||||
@@ -328,7 +328,7 @@ for collection_name in collections:
|
||||
}, output_stream)
|
||||
|
||||
with open(raw_file, 'r') as input_stream:
|
||||
with open(this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml", 'w') as output_stream:
|
||||
with open(this_dir.parent / ".github" / "workflows" / f"__{collection_name}.yml", 'w', newline='\n') as output_stream:
|
||||
content = input_stream.read()
|
||||
output_stream.write("\n".join(list(map(lambda x:x.rstrip(), content.splitlines()))+['']))
|
||||
os.remove(raw_file)
|
||||
|
||||
@@ -3,7 +3,7 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
source env/*/activate
|
||||
pip3 install ruamel.yaml==0.17.31
|
||||
python3 sync.py
|
||||
|
||||
|
||||
Reference in New Issue
Block a user