move job status to arg
This commit is contained in:
		
							parent
							
								
									e8eab2c120
								
							
						
					
					
						commit
						37fe4fc874
					
				
					 2 changed files with 7 additions and 4 deletions
				
			
		
							
								
								
									
										10
									
								
								action.yml
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								action.yml
									
										
									
									
									
								
							| 
						 | 
					@ -8,10 +8,10 @@ inputs:
 | 
				
			||||||
  topic:
 | 
					  topic:
 | 
				
			||||||
    description: 'Ntfy topic'
 | 
					    description: 'Ntfy topic'
 | 
				
			||||||
    required: true
 | 
					    required: true
 | 
				
			||||||
  status:
 | 
					  # status:
 | 
				
			||||||
    description: 'Job status. Use ${{ job.status }} for most cases'
 | 
					  #   description: 'Job status. Use ${{ job.status }} for most cases'
 | 
				
			||||||
    required: true
 | 
					  #   required: true
 | 
				
			||||||
    default: '${{ job.status }}'
 | 
					  #   default: '${{ job.status }}'
 | 
				
			||||||
  user:
 | 
					  user:
 | 
				
			||||||
    description: 'Username for ntfy server'
 | 
					    description: 'Username for ntfy server'
 | 
				
			||||||
    required: true # should be false, but we'll do authenticated sessions only for now
 | 
					    required: true # should be false, but we'll do authenticated sessions only for now
 | 
				
			||||||
| 
						 | 
					@ -21,3 +21,5 @@ inputs:
 | 
				
			||||||
runs:
 | 
					runs:
 | 
				
			||||||
  using: 'docker'
 | 
					  using: 'docker'
 | 
				
			||||||
  image: 'Dockerfile'
 | 
					  image: 'Dockerfile'
 | 
				
			||||||
 | 
					  args:
 | 
				
			||||||
 | 
					    - ${{ job.status }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
env | sort
 | 
					env | sort
 | 
				
			||||||
 | 
					echo "status should be: $1"
 | 
				
			||||||
#GITHUB_RUN_NUMBER
 | 
					#GITHUB_RUN_NUMBER
 | 
				
			||||||
# Job status: success/failure/cancelled
 | 
					# Job status: success/failure/cancelled
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue