follow-ups

This commit is contained in:
Max Schmitt 2024-04-19 19:32:37 +02:00
parent 256a15de36
commit 02e3df9cd0
4 changed files with 17 additions and 15 deletions

View file

@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: github.repository == 'microsoft/playwright' if: github.repository == 'microsoft/playwright'
permissions: permissions:
contents: read id-token: write # This is required for OIDC login (azure/login) to succeed
id-token: write contents: read # This is required for actions/checkout to succeed
environment: Release environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login)
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Azure Login - name: Azure Login
@ -59,7 +59,6 @@ jobs:
- name: build & publish driver - name: build & publish driver
env: env:
AZ_UPLOAD_FOLDER: driver/next AZ_UPLOAD_FOLDER: driver/next
AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }}
run: | run: |
utils/build/build-playwright-driver.sh utils/build/build-playwright-driver.sh
utils/build/upload-playwright-driver.sh utils/build/upload-playwright-driver.sh

View file

@ -11,11 +11,11 @@ jobs:
publish-driver-release: publish-driver-release:
name: "publish playwright driver to CDN" name: "publish playwright driver to CDN"
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
permissions:
id-token: write # This is required for OIDC login (azure/login) to succeed
contents: read # This is required for actions/checkout to succeed
if: github.repository == 'microsoft/playwright' if: github.repository == 'microsoft/playwright'
environment: Release permissions:
id-token: write # This is required for OIDC login (azure/login) to succeed
contents: read # This is required for actions/checkout to succeed
environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login)
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Azure Login - name: Azure Login
@ -35,4 +35,3 @@ jobs:
- run: utils/build/upload-playwright-driver.sh - run: utils/build/upload-playwright-driver.sh
env: env:
AZ_UPLOAD_FOLDER: driver AZ_UPLOAD_FOLDER: driver
AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }}

View file

@ -5,9 +5,11 @@ set +x
trap "cd $(pwd -P)" EXIT trap "cd $(pwd -P)" EXIT
cd "$(dirname "$0")" cd "$(dirname "$0")"
AZ_STORAGE_ACCOUNT="playwright2"
PACKAGE_VERSION=$(node -p "require('../../package.json').version") PACKAGE_VERSION=$(node -p "require('../../package.json').version")
az storage blob upload -c builds --account-name ${AZ_ACCOUNT_NAME} -f ./output/playwright-${PACKAGE_VERSION}-mac.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac.zip"
az storage blob upload -c builds --account-name ${AZ_ACCOUNT_NAME} -f ./output/playwright-${PACKAGE_VERSION}-mac-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac-arm64.zip" az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-mac.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac.zip"
az storage blob upload -c builds --account-name ${AZ_ACCOUNT_NAME} -f ./output/playwright-${PACKAGE_VERSION}-linux.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux.zip" az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-mac-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac-arm64.zip"
az storage blob upload -c builds --account-name ${AZ_ACCOUNT_NAME} -f ./output/playwright-${PACKAGE_VERSION}-linux-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux-arm64.zip" az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-linux.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux.zip"
az storage blob upload -c builds --account-name ${AZ_ACCOUNT_NAME} -f ./output/playwright-${PACKAGE_VERSION}-win32_x64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-win32_x64.zip" az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-linux-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux-arm64.zip"
az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-win32_x64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-win32_x64.zip"

View file

@ -82,7 +82,9 @@ node -e "${EMBED_METADATA_SCRIPT}" "$1" > "${REPORT_NAME}"
gzip "${REPORT_NAME}" gzip "${REPORT_NAME}"
az storage blob upload --account-name folioflakinessdashboard -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz" AZ_STORAGE_ACCOUNT="folioflakinessdashboard"
az storage blob upload --account-name "${AZ_STORAGE_ACCOUNT}" -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz"
UTC_DATE=$(cat <<EOF | node UTC_DATE=$(cat <<EOF | node
const date = new Date(); const date = new Date();