Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run local workflow support #958

Closed
sd185233 opened this issue Feb 2, 2021 · 10 comments
Closed

Run local workflow support #958

sd185233 opened this issue Feb 2, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@sd185233
Copy link

sd185233 commented Feb 2, 2021

When developing workflows, especially when trying new stuff in workflows, it would be nice to have the ability to test the workflows locally first, instead of committing and running for every change. There are tools to do this - I didn't manage to get any tool to work and also would be nice if this was supported natively.

Example use case -
-Download github runner
-Develop workflow locally
-Trigger workflow on local machine - runner local_wf.yml --repo repo_url --event push

...or are there any other ways to do this?

@sd185233 sd185233 added the enhancement New feature or request label Feb 2, 2021
@callum-tait-pbx
Copy link

@sd185233
Copy link
Author

sd185233 commented Feb 3, 2021

I tried it...downloaded it, added to path, then run act from a WF dir, selected medium image size then run act with events but nothing appeared to happen. I'll look into it again, but would be nice if this was something supported natively.

@rockandska
Copy link

A kind of --anonymous mode who will serve a http entrypoint allowing us to send a payload containing necessary information ( workflow.yaml, github.repository, etc..) would be nice to test a local directory workflow without having to add the self hosted runner to a remote repository.

@missedone
Copy link

2nd to this request, there were two critical incident on github actions recently https://www.githubstatus.com/history

we use github actions for daily CI/CD and production deployment, we're worried with the downtime of Github Actions impacts our product release.
so as fallback, better to be able to execute the github workflow from local laptop

@rockandska
Copy link

rockandska commented Mar 20, 2021

In fact, it seems it was here before the source code published on GH and cleaned after in different PR like #218.

Some remaining parts are still there

# Do not "cd $DIR". For localRun, the current directory is expected to be the repo location on disk.
# Run
shopt -s nocasematch
if [[ "$1" == "localRun" ]]; then
"$DIR"/bin/Runner.Listener $*

@JustinGrote
Copy link

act works well but it "emulates" the runner rather than using the actual code, so it will always be playing catch-up and not a true representation of the procses.

Agree with @rockandska where a Runner.Listener flag to have it listen on a port for messages rather than phone home would allow tools to be developed to initiate "test" actions into the runner itself, since the API is open source in this repository (thanks!)

@rockandska
Copy link

@TingluoHuang / @juliobbv : any chances to see this feature back ?

Regards,

@hross
Copy link
Contributor

hross commented Mar 30, 2021

We don't have plans to support this locally right now. Possibly in the future, but not in a 6 month time frame. I am going to close this and provide feedback but we would track a feature like this internally and not in the runner repo.

@hross hross closed this as completed Mar 30, 2021
@ChristopherHX
Copy link
Contributor

I tried implementing something like this during last weeks, but it probably contains a lot of bugs.
Maybe someone still want to try my Runner.Server Project based on this repo, even if this is unofficial.
https://github.com/ChristopherHX/runner.server
It is able to transform webhooks to actions jobs for the runner.
However my implementation may misbehave and is incomplete, because of some missing official code for a server and missing Tests.

@rockandska
Copy link

Thanks @ChristopherHX, seems really nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants