devops: trigger docker publishing as part of NPM publishing (#9964)
This way we can tag docker image with a matching NPM version.
This commit is contained in:
parent
9b57f0ceb5
commit
d91d58cbec
|
|
@ -1,4 +1,4 @@
|
||||||
name: "devrelease:npm"
|
name: "publish canary"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
@ -9,8 +9,8 @@ on:
|
||||||
- release-*
|
- release-*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-canary-npm:
|
publish-canary:
|
||||||
name: "publish to NPM"
|
name: "publish canary NPM & Trigger canary Docker"
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
if: github.repository == 'microsoft/playwright'
|
if: github.repository == 'microsoft/playwright'
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -44,4 +44,12 @@ jobs:
|
||||||
utils/publish_all_packages.sh --beta
|
utils/publish_all_packages.sh --beta
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
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
|
||||||
|
|
||||||
2
.github/workflows/publish_release.yml
vendored
2
.github/workflows/publish_release.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: "release"
|
name: "publish release"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
|
|
|
||||||
28
.github/workflows/trigger_canary_docker.yml
vendored
28
.github/workflows/trigger_canary_docker.yml
vendored
|
|
@ -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
|
|
||||||
Loading…
Reference in a new issue