Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: support explicit GitHub sha for chromium-with-symbols build (#7367)

Andrey Lushnikovd576b8bca858
diff --git a/.github/workflows/trigger_build_chromium.yml b/.github/workflows/trigger_build_chromium.yml
index 0dc97441af..a39fadac66 100644
--- a/.github/workflows/trigger_build_chromium.yml
+++ b/.github/workflows/trigger_build_chromium.yml
@@ -18,7 +18,7 @@ jobs:
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${GH_TOKEN}" \
- --data '{"event_type": "build_chromium"}' \
+ --data "{\"event_type\": \"build_chromium\", \"client_payload\": {\"ref\": \"${GITHUB_SHA}\"}}" \
https://api.github.com/repos/microsoft/playwright-internal/dispatches
env:
GH_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}
diff --git a/.github/workflows/trigger_build_chromium_with_symbols.yml b/.github/workflows/trigger_build_chromium_with_symbols.yml
index ec7c18e908..f63460897f 100644
--- a/.github/workflows/trigger_build_chromium_with_symbols.yml
+++ b/.github/workflows/trigger_build_chromium_with_symbols.yml
@@ -3,8 +3,20 @@ name: "Chromium With Symbols Builder"
on:
workflow_dispatch:
+ inputs:
+ ref:
+ description: 'Playwright SHA / ref to build Chromium'
+ required: true
+ default: 'master'
release:
types: [published]
+ push:
+ branches:
+ - master
+ - release-*
+ paths:
+ - browser_patches/chromium/BUILD_NUMBER
+ - .github/workflows/trigger_build_chromium.yml
jobs:
trigger:
@@ -15,7 +27,8 @@ jobs:
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${GH_TOKEN}" \
- --data '{"event_type": "build_chromium_with_symbols"}' \
+ --data "{\"event_type\": \"build_chromium_with_symbols\", \"client_payload\": {\"ref\": \"${GHREF}\"}}" \
https://api.github.com/repos/microsoft/playwright-internal/dispatches
env:
GH_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}
+ GHREF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.sha }}