mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 01:58:36 +08:00 
			
		
		
		
	Don't need to mv to git diff
This commit is contained in:
		
							parent
							
								
									547006a75d
								
							
						
					
					
						commit
						ffb7396e8e
					
				
							
								
								
									
										13
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -32,15 +32,16 @@ jobs: | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         run: npm ci |         run: npm ci | ||||||
| 
 | 
 | ||||||
|       - name: Move the committed index.js file |  | ||||||
|         run: mv dist/index.js /tmp |  | ||||||
| 
 |  | ||||||
|       - name: Rebuild the index.js file |       - name: Rebuild the index.js file | ||||||
|         run: npm run build |         run: npm run build | ||||||
| 
 | 
 | ||||||
|       - name: Compare the expected and actual index.js files |       - name: Compare the expected and actual dist/ directories | ||||||
|         run: git diff --ignore-all-space dist/index.js /tmp/index.js |         run: | | ||||||
|         id: diff |           if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||||||
|  |             echo "Detected uncommitted changes after build.  See status below:" | ||||||
|  |             git diff | ||||||
|  |             exit 1 | ||||||
|  |           fi | ||||||
| 
 | 
 | ||||||
|       # If index.js was different than expected, upload the expected version as an artifact |       # If index.js was different than expected, upload the expected version as an artifact | ||||||
|       - uses: actions/upload-artifact@v2 |       - uses: actions/upload-artifact@v2 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Brian Cristante
						Brian Cristante