Skip to content

Commit

Permalink
Add fork-guard into workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Jun 18, 2023
1 parent d754663 commit 78191a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -25,9 +25,24 @@ env:
HAVE_CLEANUP_PAT: ${{ secrets.CLEANUP_PAT != '' }}

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:
name: Build base image
if: ${{ github.event.inputs.buildOnly != 'true' }}
needs: pre_check
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down

3 comments on commit 78191a7

@suvayu
Copy link

@suvayu suvayu commented on 78191a7 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there some way to cache the downloaded tarballs instead of relying on strangers on the Internet to change the crontab?

@BtbN
Copy link
Owner Author

@BtbN BtbN commented on 78191a7 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are already cached. But the cache is per-repository.

@suvayu
Copy link

@suvayu suvayu commented on 78191a7 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I found the GH issue discussing this. I'll follow there

Please sign in to comment.