Browse Source

build: skip chromium git cookie on forks (#45737)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <[email protected]>
trop[bot] 1 month ago
parent
commit
c6e4e4cdd6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      .github/actions/set-chromium-cookie/action.yml

+ 2 - 2
.github/actions/set-chromium-cookie/action.yml

@@ -4,7 +4,7 @@ runs:
   using: "composite"
   steps:
   - name: Set the git cookie from chromium.googlesource.com (Unix)
-    if: ${{ runner.os != 'Windows' }}
+    if: ${{ runner.os != 'Windows' && env.CHROMIUM_GIT_COOKIE }}
     shell: bash
     run: |
       eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
@@ -18,7 +18,7 @@ runs:
       __END__
       eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
   - name: Set the git cookie from chromium.googlesource.com (Windows)
-    if: ${{ runner.os == 'Windows' }}
+    if: ${{ runner.os == 'Windows' && env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
     shell: cmd
     run: |
       git config --global http.cookiefile "%USERPROFILE%\.gitcookies"