Don't allow test-format.sh to be run locally
This commit is contained in:
		
							parent
							
								
									443408312a
								
							
						
					
					
						commit
						a6fcdec0f8
					
				
							
								
								
									
										2
									
								
								.github/workflows/format.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/format.yml
									
									
									
									
										vendored
									
									
								
							@ -24,7 +24,7 @@ jobs:
 | 
				
			|||||||
          sudo apt-get -y install clang-format-12
 | 
					          sudo apt-get -y install clang-format-12
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Check formatting
 | 
					      - name: Check formatting
 | 
				
			||||||
        run: tests/test-format.sh "$GITHUB_BASE_REF"
 | 
					        run: tests/test-format.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Upload patches
 | 
					      - name: Upload patches
 | 
				
			||||||
        uses: actions/upload-artifact@v3
 | 
					        uses: actions/upload-artifact@v3
 | 
				
			||||||
 | 
				
			|||||||
@ -2,11 +2,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ -z "$1" ] && exit
 | 
					if [ -z "$GITHUB_BASE_REF" ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					  echo "This script is only meant to be run in a GitHub Workflow"
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
basebranch=$1
 | 
					CHANGED_FILES=$(git diff --name-only "$GITHUB_BASE_REF"...HEAD)
 | 
				
			||||||
 | 
					 | 
				
			||||||
CHANGED_FILES=$(git diff --name-only "$basebranch"...HEAD)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
CHANGED=0
 | 
					CHANGED=0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user