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

This commit is contained in:
Andrey Lushnikov 2021-11-09 15:58:18 -08:00 committed by GitHub
parent c8b65ac677
commit 12c1716fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

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

View File

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