only trigger on repo context

This commit is contained in:
tresabhi committed 2026-11-08 18:33:35 -06:00
1 parent be9dd9721d
commit e50cc6cf5d
1 file changed
+8 -7
+8 -7
View File
@@ -66,10 +66,13 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
env: env:
# workflow
HAS_ROOT_REPO_CONTEXT: ${{ github.event_name != 'pull_request' }}
# client # client
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
CLIENT_PROVIDER: ${{ inputs.client_provider || 'wgc' }} CLIENT_PROVIDER: ${{ inputs.client_provider || (github.event_name != 'pull_request' && 'steam' || 'wgc') }}
CLIENT_SOURCE: ${{ inputs.client_source || '444200/windows' }} CLIENT_SOURCE: ${{ inputs.client_source || '444200/windows' }}
CLIENT_DIR: ../../temp/game CLIENT_DIR: ../../temp/game
@@ -90,9 +93,6 @@ env:
# wargaming # wargaming
PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }}
# workflow
SHOULD_USE_BLITZKIT_CLOSED: ${{ github.event_name != 'pull_request' }}
jobs: jobs:
build: build:
name: Build website name: Build website
@@ -119,7 +119,7 @@ jobs:
# we need to handle them here instead of disabling submodules outright # we need to handle them here instead of disabling submodules outright
- name: Checkout submodules - name: Checkout submodules
run: | run: |
if [ "$SHOULD_USE_BLITZKIT_CLOSED" = "true" ]; then if [ "$HAS_ROOT_REPO_CONTEXT" = "true" ]; then
git submodule update --init --recursive --depth=1 git submodule update --init --recursive --depth=1
else else
git submodule update --init --recursive --depth=1 -- . ':!packages/closed' git submodule update --init --recursive --depth=1 -- . ':!packages/closed'
@@ -148,7 +148,7 @@ jobs:
run: scripts/download-client.sh run: scripts/download-client.sh
- name: Download SmartDLC - name: Download SmartDLC
if: ${{ env.SHOULD_USE_BLITZKIT_CLOSED == 'true' }} if: ${{ env.HAS_ROOT_REPO_CONTEXT == 'true' }}
run: scripts/download-smart-dlc.sh run: scripts/download-smart-dlc.sh
- name: Build - name: Build
@@ -171,7 +171,8 @@ jobs:
# - is by manual and is on anything: triggering to anything # - is by manual and is on anything: triggering to anything
if: >- if: >-
${{ ${{
(github.event_name == 'schedule' && github.ref == 'refs/heads/main') env.HAS_ROOT_REPO_CONTEXT == 'true'
|| (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
|| (github.event_name == 'push' && github.ref == 'refs/heads/production') || (github.event_name == 'push' && github.ref == 'refs/heads/production')
|| (github.event_name == 'workflow_dispatch') || (github.event_name == 'workflow_dispatch')
}} }}