mirror of
https://github.com/RROrg/rr.git
synced 2025-12-10 05:59:47 +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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
def set_env(name, value):
|
def set_env(name, value):
|
||||||
with open(os.environ['GITHUB_ENV'], 'a', encoding='utf-8') as f:
|
subprocess.call(f'echo "{name}<<EOF" >> $GITHUB_ENV', shell=True)
|
||||||
f.write(f'{name}={value}\n')
|
subprocess.call(f'echo "{value}" >> $GITHUB_ENV', shell=True)
|
||||||
|
subprocess.call(f'echo "EOF" >> $GITHUB_ENV', shell=True)
|
||||||
|
|
||||||
issuetitle = """${{ github.event.issue.title }}"""
|
issuetitle = """${{ github.event.issue.title }}"""
|
||||||
issuebody = """${{ github.event.issue.body }}"""
|
issuebody = """${{ github.event.issue.body }}"""
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user