Fix YAML syntax in stable workflow — indent Python, use env var for version

This commit is contained in:
2026-05-07 23:28:42 +02:00
parent 6f6a7361fe
commit c3ea2be809
+6 -3
View File
@@ -66,11 +66,14 @@ jobs:
../homebrew-tap/Casks/claudechecker.rb 2>/dev/null || true ../homebrew-tap/Casks/claudechecker.rb 2>/dev/null || true
- name: Update README badge - name: Update README badge
env:
NEW_VERSION: ${{ steps.version.outputs.version }}
run: | run: |
python3 -c " python3 -c "
import os, re
v = os.environ['NEW_VERSION']
content = open('README.md').read() content = open('README.md').read()
import re content = re.sub(r'version-[0-9][^-]*-orange', 'version-' + v + '-orange', content)
content = re.sub(r'version-[0-9][^-]*-orange', 'version-${{ steps.version.outputs.version }}-orange', content)
lines = content.splitlines(keepends=True) lines = content.splitlines(keepends=True)
out = [] out = []
for line in lines: for line in lines:
@@ -78,7 +81,7 @@ for line in lines:
continue continue
out.append(line) out.append(line)
if 'license-MIT-blue' in line: if 'license-MIT-blue' in line:
out.append('<!-- BETA_BADGE -->\n') out.append('<!-- BETA_BADGE -->' + chr(10))
open('README.md', 'w').writelines(out) open('README.md', 'w').writelines(out)
" "