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

Support execute local script over ssh #284

Closed
appleboy opened this issue Oct 23, 2024 · 3 comments · Fixed by #285
Closed

Support execute local script over ssh #284

appleboy opened this issue Oct 23, 2024 · 3 comments · Fixed by #285

Comments

@appleboy
Copy link
Owner

ref: appleboy/ssh-action#186

@kyle-leonhard
Copy link
Contributor

kyle-leonhard commented Oct 24, 2024

@appleboy, I'm interested in seeing appleboy/ssh-action#186 happen. Can I contribute a PR to drone-ssh?

Is it as easy as adding a new script.file flag that's read in main.go and appended to the scripts?

Something like (#285):

if f := c.String("script.file"); f != "" {
	s, err := os.ReadFile(f)
	if err != nil {
		return err
	}
	scripts = append(scripts, string(s))
}

@appleboy
Copy link
Owner Author

@kyle-leonhard Yes. you can do it. Thanks. If you don't have time, I plan to write a version today for validation testing.

@kyle-leonhard
Copy link
Contributor

Sweet! Before I saw your message, I started plumbing it in ssh-action: https://github.com/appleboy/ssh-action/pull/341/files. Happy to contribute that or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants