mirror of
https://github.com/RROrg/rr.git
synced 2025-12-08 21:19:43 +08:00
优化环境变量设置逻辑,使用subprocess调用替代文件写入
This commit is contained in:
parent
9a4103f028
commit
cfdf7cc3fc
8
.github/workflows/issues.yml
vendored
8
.github/workflows/issues.yml
vendored
@ -29,11 +29,13 @@ jobs:
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def set_env(name, value):
|
||||
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as f:
|
||||
f.write(f'{name}={value}\n')
|
||||
|
||||
subprocess.call(f'echo "{name}<<EOF" >> $GITHUB_ENV', shell=True)
|
||||
subprocess.call(f'echo "{value}" >> $GITHUB_ENV', shell=True)
|
||||
subprocess.call(f'echo "EOF" >> $GITHUB_ENV', shell=True)
|
||||
|
||||
issuetitle = """${{ github.event.issue.title }}"""
|
||||
issuebody = """${{ github.event.issue.body }}"""
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user