You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/python3# This script can be used to call Runner.Worker as github-act-runner worker on unix like systems# You just have to create simple .runner file in the root folder with the following Content# {"workFolder": "_work"}# Then use `python3 path/to/this/script.py path/to/actions/runner/bin/Runner.Worker` as the worker argsimportsysimportsubprocessimportosimportthreadingimportcodecsifsys.argv[1] !="spawnclient":
print("Unknown command", sys.argv[1])
sys.exit(1)
readfd=int(sys.argv[2])
writefd=int(sys.argv[3])
rdr, rdw=os.pipe()
defredirectio():
while(True):
messageType=int.from_bytes(os.read(readfd, 4), sys.byteorder, signed=False)
os.write(rdw, messageType.to_bytes(4, "big", signed=False))
messageLength=int.from_bytes(os.read(readfd, 4), sys.byteorder, signed=False)
message=os.read(readfd, messageLength)
encoded=codecs.decode(message, "utf_16").encode("utf-8")
os.write(rdw, len(encoded).to_bytes(4, "big", signed=False))
os.write(rdw, encoded)
threading.Thread(target=redirectio, daemon=True).start()
code=subprocess.call(["/path/to/github-act-runner", "worker"], stdin=rdr, stdout=sys.stdout, pass_fds=(rdr, sys.stdout.fileno()))
print(code)
# https://github.com/actions/runner/blob/af6ed41bcb47019cce2a7035bad76c97ac97b92a/src/Runner.Common/Util/TaskResultUtil.cs#L13-L14ifcode==0:
sys.exit(100)
else:
sys.exit(1)
Using both actions/runner pipe to github-act-runner stdio to actions/runner pipe works across stdio redirection. Better docker runtime than the modified actions/runner.
Currently only actions/runner and microsoft/azure-pipelines-agent are managed via
--runner-version
and the azpipelines event to use the ado agents.The text was updated successfully, but these errors were encountered: