Pass S3 secrets for nightly builds and fix windows build

Secrets need to be passed to reusable workflows either
by name or by `secrets: inherit` from the caller workflow.
The latter allows accessing all secrets in scope.

Windows build has a bug where the upload-nightly command is
not run from the correct working directory.

Closes #29614

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
This commit is contained in:
Mukilan Thiyagarajan 2023-04-11 14:02:41 +05:30
parent aad3ad9102
commit 757666fd4b
2 changed files with 5 additions and 0 deletions

View file

@ -19,6 +19,7 @@ jobs:
with: with:
layout: '2013' layout: '2013'
upload: true upload: true
secrets: inherit
upload-mac: upload-mac:
# This job is only useful when run on upstream servo. # This job is only useful when run on upstream servo.
@ -28,6 +29,7 @@ jobs:
with: with:
layout: '2013' layout: '2013'
upload: true upload: true
secrets: inherit
upload-linux: upload-linux:
# This job is only useful when run on upstream servo. # This job is only useful when run on upstream servo.
@ -37,6 +39,7 @@ jobs:
with: with:
layout: '2013' layout: '2013'
upload: true upload: true
secrets: inherit
upload-linux-2020: upload-linux-2020:
# This job is only useful when run on upstream servo. # This job is only useful when run on upstream servo.
@ -46,3 +49,4 @@ jobs:
with: with:
layout: '2020' layout: '2020'
upload: true upload: true
secrets: inherit

View file

@ -82,6 +82,7 @@ jobs:
path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe
- name: Upload - name: Upload
if: ${{ inputs.upload }} if: ${{ inputs.upload }}
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach upload-nightly windows-msvc --secret-from-environment run: python mach upload-nightly windows-msvc --secret-from-environment
env: env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }} S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}