CI: Allow skipping our GHA workflows with `DISABLE_GODOT_CI` variable

Useful for custom forks of Godot which don't want to run our CI for any
reason.

This is configured in `settings/variables/actions` for the repository,
setting it to any value aside from an empty string will skip all jobs.

(cherry picked from commit 4646762c81)
This commit is contained in:
Rémi Verschelde 2023-07-11 10:24:56 +02:00 committed by Yuri Sizov
parent e1a12879e9
commit caa8c82567
1 changed files with 8 additions and 0 deletions

View File

@ -9,37 +9,44 @@ jobs:
# First stage: Only static checks, fast and prevent expensive builds from running. # First stage: Only static checks, fast and prevent expensive builds from running.
static-checks: static-checks:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 📊 Static checks name: 📊 Static checks
uses: ./.github/workflows/static_checks.yml uses: ./.github/workflows/static_checks.yml
# Second stage: Run all the builds and some of the tests. # Second stage: Run all the builds and some of the tests.
android-build: android-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🤖 Android name: 🤖 Android
needs: static-checks needs: static-checks
uses: ./.github/workflows/android_builds.yml uses: ./.github/workflows/android_builds.yml
ios-build: ios-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🍏 iOS name: 🍏 iOS
needs: static-checks needs: static-checks
uses: ./.github/workflows/ios_builds.yml uses: ./.github/workflows/ios_builds.yml
linux-build: linux-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🐧 Linux name: 🐧 Linux
needs: static-checks needs: static-checks
uses: ./.github/workflows/linux_builds.yml uses: ./.github/workflows/linux_builds.yml
macos-build: macos-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🍎 macOS name: 🍎 macOS
needs: static-checks needs: static-checks
uses: ./.github/workflows/macos_builds.yml uses: ./.github/workflows/macos_builds.yml
windows-build: windows-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🏁 Windows name: 🏁 Windows
needs: static-checks needs: static-checks
uses: ./.github/workflows/windows_builds.yml uses: ./.github/workflows/windows_builds.yml
web-build: web-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🌐 Web name: 🌐 Web
needs: static-checks needs: static-checks
uses: ./.github/workflows/web_builds.yml uses: ./.github/workflows/web_builds.yml
@ -49,6 +56,7 @@ jobs:
# Can be turned off for PRs that intentionally break compat with godot-cpp, # Can be turned off for PRs that intentionally break compat with godot-cpp,
# until both the upstream PR and the matching godot-cpp changes are merged. # until both the upstream PR and the matching godot-cpp changes are merged.
godot-cpp-test: godot-cpp-test:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🪲 Godot CPP name: 🪲 Godot CPP
# This can be changed to depend on another platform, if we decide to use it for # This can be changed to depend on another platform, if we decide to use it for
# godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step # godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step