Skip to content

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

chore: move to a new docker publishing (#10169)

Andrey Lushnikov12c1716fccff
diff --git a/.github/workflows/publish_canary.yml b/.github/workflows/publish_canary.yml
index 6baea90e0e..781b898bd4 100644
--- a/.github/workflows/publish_canary.yml
+++ b/.github/workflows/publish_canary.yml
@@ -45,12 +45,15 @@ jobs:
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)')
+ if [[ "${VERSION}" != *-* ]]; then
+ echo "ERROR: canary version must have dash inside, received '${VERSION}' instead"
+ exit 1
+ fi
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}\"}}" \
+ --data "{\"event_type\": \"publish_docker\", \"client_payload\": {\"ref\": \"${{ github.sha }}\", \"package_version\": \"${VERSION}\", \"release_channel\": \"canary\"}}" \
https://api.github.com/repos/microsoft/playwright-internal/dispatches
publish-trace-viewer:
diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml
index dcc15586de..927282188c 100644
--- a/.github/workflows/publish_release.yml
+++ b/.github/workflows/publish_release.yml
@@ -49,11 +49,17 @@ jobs:
runs-on: ubuntu-20.04
if: github.repository == 'microsoft/playwright'
steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: 12
+ registry-url: 'https://registry.npmjs.org'
- run: |
+ 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_production\", \"client_payload\": {\"ref\": \"${{ github.sha }}\"}}" \
+ --data "{\"event_type\": \"publish_docker\", \"client_payload\": {\"ref\": \"${{ github.sha }}\", \"package_version\": \"${VERSION}\", \"release_channel\": \"stable\"}}" \
https://api.github.com/repos/microsoft/playwright-internal/dispatches
publish-trace-viewer: