Add fork-guard into workflow

This commit is contained in:
BtbN 2023-06-18 12:18:47 +02:00
parent d75466340a
commit 78191a73a6

View file

@ -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