Skip to content

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

devops: trigger docker publishing as part of NPM publishing (#9964)

Andrey Lushnikovd91d58cbec1f
diff --git a/.github/workflows/publish_canary_npm.yml b/.github/workflows/publish_canary.yml
similarity index 69%
rename from .github/workflows/publish_canary_npm.yml
rename to .github/workflows/publish_canary.yml
index 219148a282..674b0b8db0 100644
--- a/.github/workflows/publish_canary_npm.yml
+++ b/.github/workflows/publish_canary.yml
@@ -1,4 +1,4 @@
-name: "devrelease:npm"
+name: "publish canary"
on:
workflow_dispatch:
@@ -9,8 +9,8 @@ on:
- release-*
jobs:
- publish-canary-npm:
- name: "publish to NPM"
+ publish-canary:
+ name: "publish canary NPM & Trigger canary Docker"
runs-on: ubuntu-20.04
if: github.repository == 'microsoft/playwright'
steps:
@@ -44,4 +44,12 @@ jobs:
utils/publish_all_packages.sh --beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+ - run: |
+ # Trigger canary docker build and tag it with NPM canary version
+ VERSION=$(node -e 'console.log(require("./package.json").version)')
+ curl -X POST \
+ -H "Accept: application/vnd.github.v3+json" \
+ -H "Authorization: token ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}" \
+ --data "{\"event_type\": \"build_docker_canary\", \"client_payload\": {\"ref\": \"${{ github.sha }}\", \"package_version\": \"${VERSION}\"}}" \
+ https://api.github.com/repos/microsoft/playwright-internal/dispatches
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml
index 78d3f3366a..a7adea08f8 100644
--- a/.github/workflows/publish_release.yml
+++ b/.github/workflows/publish_release.yml
@@ -1,4 +1,4 @@
-name: "release"
+name: "publish release"
on:
release:
diff --git a/.github/workflows/trigger_canary_docker.yml b/.github/workflows/trigger_canary_docker.yml
deleted file mode 100644
index 4092fb8e0d..0000000000
--- a/.github/workflows/trigger_canary_docker.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: "devrelease:docker"
-
-on:
- workflow_dispatch:
- schedule:
- - cron: "10 0 * * *"
- push:
- branches:
- - master
- - release-*
- paths:
- - utils/docker/**
- - browsers.json
- - .github/workflows/trigger_canary_docker.yml
- - src/nativeDeps.ts
-
-jobs:
- trigger-docker-canary:
- name: "Trigger Docker build"
- runs-on: ubuntu-20.04
- if: github.repository == 'microsoft/playwright'
- steps:
- - run: |
- curl -X POST \
- -H "Accept: application/vnd.github.v3+json" \
- -H "Authorization: token ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}" \
- --data "{\"event_type\": \"build_docker_canary\", \"client_payload\": {\"ref\": \"${{ github.sha }}\"}}" \
- https://api.github.com/repos/microsoft/playwright-internal/dispatches