feat: Copy file via ssh key
This commit is contained in:
		
							
								
								
									
										18
									
								
								.github/main.workflow
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.github/main.workflow
									
									
									
									
										vendored
									
									
								
							@@ -1,11 +1,12 @@
 | 
			
		||||
workflow "Copy File Via SSH" {
 | 
			
		||||
  on = "push"
 | 
			
		||||
  resolves = [
 | 
			
		||||
    "Copy multiple file",
 | 
			
		||||
    "Copy file via ssh password",
 | 
			
		||||
    "Copy file via ssh key",
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
action "Copy multiple file" {
 | 
			
		||||
action "Copy file via ssh password" {
 | 
			
		||||
  uses = "appleboy/scp-action@master"
 | 
			
		||||
  env = {
 | 
			
		||||
    SOURCE = "tests/a.txt,tests/b.txt"
 | 
			
		||||
@@ -17,3 +18,16 @@ action "Copy multiple file" {
 | 
			
		||||
    "PASSWORD",
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
action "Copy file via ssh key" {
 | 
			
		||||
  uses = "appleboy/scp-action@master"
 | 
			
		||||
  env = {
 | 
			
		||||
    SOURCE = "tests/a.txt,tests/b.txt"
 | 
			
		||||
    TARGET = "/home/actions/test"
 | 
			
		||||
  }
 | 
			
		||||
  secrets = [
 | 
			
		||||
    "HOST",
 | 
			
		||||
    "USERNAME",
 | 
			
		||||
    "KEY",
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								tests/c.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/c.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
c
 | 
			
		||||
							
								
								
									
										1
									
								
								tests/d.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tests/d.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
d
 | 
			
		||||
		Reference in New Issue
	
	Block a user