Add fork-guard into workflow
This commit is contained in:
		
							parent
							
								
									d75466340a
								
							
						
					
					
						commit
						78191a73a6
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -25,9 +25,24 @@ env:
 | 
				
			||||||
  HAVE_CLEANUP_PAT: ${{ secrets.CLEANUP_PAT != '' }}
 | 
					  HAVE_CLEANUP_PAT: ${{ secrets.CLEANUP_PAT != '' }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
 | 
					  pre_check:
 | 
				
			||||||
 | 
					    name: Pre Checks
 | 
				
			||||||
 | 
					    if: ${{ github.event.inputs.buildOnly != 'true' }}
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Repo Check
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          if [[ "$GITHUB_REPOSITORY" != "BtbN/FFmpeg-Builds" ]]; then
 | 
				
			||||||
 | 
					            echo "When forking this repository to make your own builds, you have to adjust this check."
 | 
				
			||||||
 | 
					            echo "When doing so make sure to randomize the scheduled cron time above, in order to spread out the various build times as much as possible."
 | 
				
			||||||
 | 
					            echo "This has been put in place due to the enormous amounts of traffic hundreds/thousands of parallel builds can cause on external infrastructure."
 | 
				
			||||||
 | 
					            exit 1
 | 
				
			||||||
 | 
					          fi
 | 
				
			||||||
 | 
					          exit 0
 | 
				
			||||||
  build_base:
 | 
					  build_base:
 | 
				
			||||||
    name: Build base image
 | 
					    name: Build base image
 | 
				
			||||||
    if: ${{ github.event.inputs.buildOnly != 'true' }}
 | 
					    if: ${{ github.event.inputs.buildOnly != 'true' }}
 | 
				
			||||||
 | 
					    needs: pre_check
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout
 | 
					      - name: Checkout
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue