简体   繁体   English

有没有办法使用 Github Actions 停止和重新启动自托管的 Python 脚本?

[英]Is there a way to stop and restart a self hosted Python script using Github Actions?

I have a project in which one of the tests consists of running a process indefinitely in order to collect data on the program execution.我有一个项目,其中一个测试包括无限期地运行一个进程以收集有关程序执行的数据。

It's a Python script that runs locally on a Linux machine, but I'd like for other people in my team to have access to it as well because there are specific moments where the process needs to be restarted.这是一个在 Linux 机器上本地运行的 Python 脚本,但我希望团队中的其他人也能访问它,因为在某些特定时刻需要重新启动进程。

Is there a way to set up a workflow on this machine that when dispatched, stops and restarts the process?有没有办法在这台机器上设置一个工作流,在调度时停止并重新启动进程?

You can execute commands on your Linux host via GH Actions and SSH.您可以通过 GH Actions 和 SSH 在 Linux 主机上执行命令。 Take a look at this action .看看这个动作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM