8282 description : ' CPU architecture to build for'
8383 default : " x64"
8484 type : string
85+ secrets :
86+ R2_ACCOUNT_ID :
87+ description : Cloudflare R2 account ID
88+ required : false
89+ R2_ACCESS_KEY_ID :
90+ description : Cloudflare R2 access key ID
91+ required : false
92+ R2_SECRET_ACCESS_KEY :
93+ description : Cloudflare R2 secret access key
94+ required : false
8595
8696permissions :
8797 id-token : write
@@ -101,6 +111,7 @@ jobs:
101111 UPLOAD_TO_BASE_BUCKET : ${{ matrix.upload_to_base_bucket }}
102112 name : build-${{ matrix.build_name }}
103113 runs-on : ${{ matrix.validation_runner }}
114+ environment : ${{(inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && (startsWith(github.event.ref, 'refs/heads/nightly') || startsWith(github.event.ref, 'refs/tags/v')))) && 'pytorchbot-env' || ''}}
104115 defaults :
105116 run :
106117 shell : bash -l {0}
@@ -391,6 +402,23 @@ jobs:
391402 trigger-event : ${{ inputs.trigger-event }}
392403 architecture : ${{ inputs.architecture }}
393404
405+ upload-r2 :
406+ needs : build
407+ uses : ./.github/workflows/_binary_upload_r2.yml
408+ if : always()
409+ with :
410+ repository : ${{ inputs.repository }}
411+ ref : ${{ inputs.ref }}
412+ test-infra-repository : ${{ inputs.test-infra-repository }}
413+ test-infra-ref : ${{ inputs.test-infra-ref }}
414+ build-matrix : ${{ inputs.build-matrix }}
415+ trigger-event : ${{ inputs.trigger-event }}
416+ architecture : ${{ inputs.architecture }}
417+ secrets :
418+ R2_ACCOUNT_ID : ${{ secrets.R2_ACCOUNT_ID }}
419+ R2_ACCESS_KEY_ID : ${{ secrets.R2_ACCESS_KEY_ID }}
420+ R2_SECRET_ACCESS_KEY : ${{ secrets.R2_SECRET_ACCESS_KEY }}
421+
394422concurrency :
395423 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }}
396- cancel-in-progress : true
424+ cancel-in-progress : true
0 commit comments