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

This commit is contained in:
Andrey Lushnikov 2021-06-28 14:26:15 -07:00 committed by GitHub
parent 530523cb67
commit d576b8bca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -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 }}

View file

@ -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 }}