mirror of
				https://github.com/0glabs/0g-chain.git
				synced 2025-11-04 06:37:26 +00:00 
			
		
		
		
	metric workflow status based on overall result
This commit is contained in:
		
							parent
							
								
									d0f83dc529
								
							
						
					
					
						commit
						67e1938190
					
				
							
								
								
									
										10
									
								
								.github/workflows/metric-pipeline.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/metric-pipeline.yml
									
									
									
									
										vendored
									
									
								
							@ -21,6 +21,7 @@ on:
 | 
			
		||||
jobs:
 | 
			
		||||
  metric-pipeline-result:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    if: always() # always run to capture workflow success or failure
 | 
			
		||||
    steps:
 | 
			
		||||
      # Make sure the secrets are stored in you repo settings
 | 
			
		||||
      - name: Configure AWS Credentials
 | 
			
		||||
@ -29,11 +30,16 @@ jobs:
 | 
			
		||||
          aws-access-key-id: ${{ secrets.CI_AWS_KEY_ID }}
 | 
			
		||||
          aws-secret-access-key: ${{ secrets.CI_AWS_KEY_SECRET }}
 | 
			
		||||
          aws-region: ${{ inputs.aws-region }}
 | 
			
		||||
        if: always()  # Setup credentials even if the workflow failed
 | 
			
		||||
      - name: Calculate Pipleline Success
 | 
			
		||||
        # run this action to get the workflow conclusion
 | 
			
		||||
        # You can get the conclusion via env (env.WORKFLOW_CONCLUSION)
 | 
			
		||||
        # values: neutral, success, skipped, cancelled, timed_out,
 | 
			
		||||
        # action_required, failure
 | 
			
		||||
        uses: technote-space/workflow-conclusion-action@v3
 | 
			
		||||
      - name: Metric Pipleline Success
 | 
			
		||||
        # replace TAG by the latest tag in the repository
 | 
			
		||||
        uses: ros-tooling/action-cloudwatch-metrics@0.0.5
 | 
			
		||||
        if: always()  # Need to run to log the workflow failure
 | 
			
		||||
        with:
 | 
			
		||||
          metric-value: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
 | 
			
		||||
          metric-name: ${{ inputs.metric-name }}
 | 
			
		||||
          namespace: ${{ inputs.namespace }}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user