mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 02:37:05 +00:00 
			
		
		
		
	refactor(ci): use custom action for checking codegen status (#5493)
This commit is contained in:
		
							parent
							
								
									85a55ffac7
								
							
						
					
					
						commit
						44122d4e08
					
				
							
								
								
									
										16
									
								
								.github/actions/ensure-codegen-updated/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.github/actions/ensure-codegen-updated/action.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | name: 'Ensure codegen is updated' | ||||||
|  | description: 'Will check the local filesystem against git, and abort if there are uncommitted changes.' | ||||||
|  | 
 | ||||||
|  | runs: | ||||||
|  |   using: "composite" | ||||||
|  |   steps: | ||||||
|  |     - shell: bash | ||||||
|  |       run: | | ||||||
|  |         if output=$(git status --porcelain) && [ ! -z "$output" ]; then | ||||||
|  |           # See https://unix.stackexchange.com/a/155077/378179. | ||||||
|  |           echo 'There are uncommitted changes:' | ||||||
|  |           echo $output | ||||||
|  |           exit 1 | ||||||
|  |         else | ||||||
|  |           echo 'All good!' | ||||||
|  |         fi | ||||||
							
								
								
									
										10
									
								
								.github/workflows/build-and-test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/build-and-test.yml
									
									
									
									
										vendored
									
									
								
							| @ -48,15 +48,7 @@ jobs: | |||||||
|             **/build/test-results/test/** |             **/build/test-results/test/** | ||||||
|             **/junit.*.xml |             **/junit.*.xml | ||||||
|       - name: Ensure codegen is updated |       - name: Ensure codegen is updated | ||||||
|         run: | |         uses: ./.github/actions/ensure-codegen-updated | ||||||
|           if output=$(git status --porcelain) && [ ! -z "$output" ]; then |  | ||||||
|             # See https://unix.stackexchange.com/a/155077/378179. |  | ||||||
|             echo 'There are uncommitted changes:' |  | ||||||
|             echo $output |  | ||||||
|             exit 1 |  | ||||||
|           else |  | ||||||
|             echo 'All good!' |  | ||||||
|           fi |  | ||||||
|       - name: Slack failure notification |       - name: Slack failure notification | ||||||
|         if: failure() && github.event_name == 'push' |         if: failure() && github.event_name == 'push' | ||||||
|         uses: kpritam/slack-job-status-action@v1 |         uses: kpritam/slack-job-status-action@v1 | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								.github/workflows/metadata-io.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/metadata-io.yml
									
									
									
									
										vendored
									
									
								
							| @ -51,15 +51,7 @@ jobs: | |||||||
|             **/build/test-results/test/** |             **/build/test-results/test/** | ||||||
|             **/junit.*.xml |             **/junit.*.xml | ||||||
|       - name: Ensure codegen is updated |       - name: Ensure codegen is updated | ||||||
|         run: | |         uses: ./.github/actions/ensure-codegen-updated | ||||||
|           if output=$(git status --porcelain) && [ ! -z "$output" ]; then |  | ||||||
|             # See https://unix.stackexchange.com/a/155077/378179. |  | ||||||
|             echo 'There are uncommitted changes:' |  | ||||||
|             echo $output |  | ||||||
|             exit 1 |  | ||||||
|           else |  | ||||||
|             echo 'All good!' |  | ||||||
|           fi |  | ||||||
| 
 | 
 | ||||||
|   event-file: |   event-file: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Harshal Sheth
						Harshal Sheth