build: set chromium cookie on depot tools requests (#45599)
* build: set chromium cookie on depot tools requests Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * build: correct secrets syntax Co-authored-by: Keeley Hammond <khammond@slack-corp.com> * build: handle windows cmd Co-authored-by: Keeley Hammond <khammond@slack-corp.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
This commit is contained in:
parent
107c0c6c6e
commit
8fb9fd97df
7 changed files with 46 additions and 0 deletions
2
.github/actions/checkout/action.yml
vendored
2
.github/actions/checkout/action.yml
vendored
|
@ -20,6 +20,8 @@ runs:
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
|
- name: Set Chromium Git Cookie
|
||||||
|
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
26
.github/actions/set-chromium-cookie/action.yml
vendored
Normal file
26
.github/actions/set-chromium-cookie/action.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: 'Set Chromium Git Cookie'
|
||||||
|
description: 'Sets an authenticated cookie from Chromium to allow for a higher request limit'
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Set the git cookie from chromium.googlesource.com (Unix)
|
||||||
|
if: ${{ runner.os != 'Windows' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
|
||||||
|
touch ~/.gitcookies
|
||||||
|
chmod 0600 ~/.gitcookies
|
||||||
|
|
||||||
|
git config --global http.cookiefile ~/.gitcookies
|
||||||
|
|
||||||
|
tr , \\t <<\__END__ >>~/.gitcookies
|
||||||
|
${{ env.CHROMIUM_GIT_COOKIE }}
|
||||||
|
__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' }}
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
|
||||||
|
powershell -noprofile -nologo -command Write-Output "${{ env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}" >>"%USERPROFILE%\.gitcookies"
|
||||||
|
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -100,6 +100,7 @@ jobs:
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
- /var/run/sas:/var/run/sas
|
||||||
env:
|
env:
|
||||||
|
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||||
outputs:
|
outputs:
|
||||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
||||||
|
@ -126,6 +127,7 @@ jobs:
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
- /var/run/sas:/var/run/sas
|
||||||
env:
|
env:
|
||||||
|
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||||
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
||||||
outputs:
|
outputs:
|
||||||
|
@ -150,6 +152,8 @@ jobs:
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
env:
|
env:
|
||||||
|
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||||
|
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||||
TARGET_OS: 'win'
|
TARGET_OS: 'win'
|
||||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||||
|
|
2
.github/workflows/pipeline-electron-lint.yml
vendored
2
.github/workflows/pipeline-electron-lint.yml
vendored
|
@ -27,6 +27,8 @@ jobs:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
|
- name: Set Chromium Git Cookie
|
||||||
|
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||||
- name: Setup third_party Depot Tools
|
- name: Setup third_party Depot Tools
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -65,6 +65,8 @@ concurrency:
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref_protected != true }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||||
|
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||||
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
|
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
||||||
|
@ -125,6 +127,8 @@ jobs:
|
||||||
GN_EXTRA_ARGS='is_asan=true'
|
GN_EXTRA_ARGS='is_asan=true'
|
||||||
fi
|
fi
|
||||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||||
|
- name: Set Chromium Git Cookie
|
||||||
|
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -36,6 +36,8 @@ permissions:
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||||
|
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||||
ELECTRON_OUT_DIR: Default
|
ELECTRON_OUT_DIR: Default
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
|
|
||||||
|
@ -124,6 +126,8 @@ jobs:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
|
- name: Set Chromium Git Cookie
|
||||||
|
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -57,6 +57,8 @@ jobs:
|
||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
|
- name: Set Chromium Git Cookie
|
||||||
|
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
|
@ -118,6 +120,8 @@ jobs:
|
||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
|
- name: Set Chromium Git Cookie
|
||||||
|
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Reference in a new issue