mirror of
				https://github.com/appleboy/ssh-action.git
				synced 2025-10-31 00:10:11 +08:00 
			
		
		
		
	chore(ssh): pass all ENV variables to script (#259)
This commit is contained in:
		
							parent
							
								
									a01d3ea1df
								
							
						
					
					
						commit
						5ac43dd762
					
				
							
								
								
									
										18
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @ -198,6 +198,23 @@ jobs: | |||||||
|           echo "I am $BAR, thanks" |           echo "I am $BAR, thanks" | ||||||
|           echo "I am $TEST_AAA, thanks" |           echo "I am $TEST_AAA, thanks" | ||||||
| 
 | 
 | ||||||
|  |     - name: pass all ENV variables to script | ||||||
|  |       uses: ./ | ||||||
|  |       env: | ||||||
|  |         INPUT_FOO: "BAR" | ||||||
|  |         INPUT_AAA: "BBB" | ||||||
|  |       with: | ||||||
|  |         host: ${{ secrets.HOST }} | ||||||
|  |         username: ${{ secrets.USERNAME }} | ||||||
|  |         key: ${{ secrets.KEY }} | ||||||
|  |         port: ${{ secrets.PORT }} | ||||||
|  |         allenvs: true | ||||||
|  |         script: | | ||||||
|  |           echo "I am $INPUT_FOO, thanks" | ||||||
|  |           echo "I am $INPUT_AAA, thanks" | ||||||
|  |           echo "$GITHUB_BASE_REF" | ||||||
|  |           echo "$GITHUB_REF" | ||||||
|  | 
 | ||||||
|   testing03: |   testing03: | ||||||
|     name: git clone and pull |     name: git clone and pull | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| @ -245,3 +262,4 @@ jobs: | |||||||
|         script_stop: true |         script_stop: true | ||||||
|         script: | |         script: | | ||||||
|           echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin |           echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| FROM ghcr.io/appleboy/drone-ssh:1.6.14 | FROM ghcr.io/appleboy/drone-ssh:1.7.0 | ||||||
| 
 | 
 | ||||||
| COPY entrypoint.sh /entrypoint.sh | COPY entrypoint.sh /entrypoint.sh | ||||||
| RUN chmod +x /entrypoint.sh | RUN chmod +x /entrypoint.sh | ||||||
|  | |||||||
| @ -65,6 +65,8 @@ inputs: | |||||||
|     description: 'Flexible configuration for environment value transfer.' |     description: 'Flexible configuration for environment value transfer.' | ||||||
|   debug: |   debug: | ||||||
|     description: 'Enable debug mode.' |     description: 'Enable debug mode.' | ||||||
|  |   allenvs: | ||||||
|  |     description: 'pass all environment variable to shell script.' | ||||||
| runs: | runs: | ||||||
|   using: 'docker' |   using: 'docker' | ||||||
|   image: 'Dockerfile' |   image: 'Dockerfile' | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Bo-Yi Wu
						Bo-Yi Wu