diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a8818e7d53..f0b3bf8c71 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -12,6 +12,7 @@ on: env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir + GITHUB_TOKEN: ${{ github.token }} jobs: prepare_matrix: @@ -45,6 +46,13 @@ jobs: architecture: ${{ fromJson(needs.prepare_matrix.outputs.matrix_architecture) }} python_version: ${{ fromJson(needs.prepare_matrix.outputs.matrix_python_version) }} steps: + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials + - name: Check expanded matrix config if: github.event.inputs.expanded_matrix == '1' run: | diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 74aeb6b5c3..13db3f4219 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -37,6 +37,7 @@ env: xcodeVersion: "12.2" # LLVM version with ARM MachO support has no version number yet. llvmVer: "5f187f0afaad33013ba03454c4749d99b1362534" + GITHUB_TOKEN: ${{ github.token }} jobs: log_inputs: @@ -182,6 +183,13 @@ jobs: runs-on: macos-latest if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} steps: + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials + - name: setup Xcode version (macos) if: runner.os == 'macOS' run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer @@ -242,6 +250,13 @@ jobs: with: path: sdk-src + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials + - name: Cache NDK id: cache_ndk uses: actions/cache@v2 @@ -333,6 +348,13 @@ jobs: architecture: "arm64" steps: + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials + - name: setup Xcode version (macos) if: runner.os == 'macOS' run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 9e3bb37213..291ab1cac2 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -12,6 +12,7 @@ on: env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir + GITHUB_TOKEN: ${{ github.token }} jobs: prepare_matrix: @@ -85,6 +86,13 @@ jobs: - xcode_version: "11.7" architecture: "arm64" steps: + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials + - name: Setup Xcode version (macos) if: runner.os == 'macOS' run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index f703331ca4..78f4676b9e 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -47,6 +47,7 @@ env: statusCommentIdentifier: "integration-test-status-comment" pythonVersion: '3.7' artifactRetentionDays: 2 + GITHUB_TOKEN: ${{ github.token }} jobs: check_and_prepare: @@ -69,8 +70,6 @@ jobs: uses: lannonbr/repo-permission-check-action@2.0.0 with: permission: "admin" - env: - GITHUB_TOKEN: ${{ github.token }} ### It sets "github_ref,trigger,pr_number,requested_tests" outputs to control the following jobs and steps ### trigger value: manual_trigger, scheduled_trigger, label_trigger, postsubmit_trigger - id: set_outputs @@ -213,6 +212,12 @@ jobs: with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - name: Set env vars (Linux) if: startsWith(matrix.os, 'ubuntu') run: echo "VCPKG_TRIPLET=x64-linux" >> $GITHUB_ENV @@ -386,6 +391,12 @@ jobs: with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - name: Add msbuild to PATH (Windows) if: startsWith(matrix.os, 'windows') uses: microsoft/setup-msbuild@v1.0.2 @@ -501,6 +512,12 @@ jobs: with: ref: ${{needs.check_and_prepare.outputs.github_ref}} submodules: true + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials - name: Setup python uses: actions/setup-python@v2 with: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index a1a8051071..71d4481147 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -9,6 +9,10 @@ on: description: 'Use an expanded matrix?' default: '0' required: true + +env: + GITHUB_TOKEN: ${{ github.token }} + jobs: prepare_matrix: runs-on: ubuntu-latest @@ -35,6 +39,13 @@ jobs: matrix: xcode_verison: ${{ fromJson(needs.prepare_matrix.outputs.matrix_xcode_version) }} steps: + - name: Store git credentials for all git commands + # Forces all git commands to use authenticated https, to prevent throttling. + shell: bash + run: | + git config --global credential.helper 'store --file /tmp/git-credentials' + echo 'https://${{ github.token }}@github.com' > /tmp/git-credentials + - name: setup Xcode version (macos) if: runner.os == 'macOS' run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_verison }}.app/Contents/Developer