mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
devops: move Docker build to playwright-internal (#9023)
This commit is contained in:
parent
a892fe6db0
commit
0713cb3d39
41
.github/workflows/publish_canary_docker.yml
vendored
41
.github/workflows/publish_canary_docker.yml
vendored
@ -1,41 +0,0 @@
|
|||||||
name: "devrelease:docker"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- release-*
|
|
||||||
paths:
|
|
||||||
- utils/docker/**
|
|
||||||
- browsers.json
|
|
||||||
- .github/workflows/publish_canary_docker.yml
|
|
||||||
- src/nativeDeps.ts
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-canary-docker:
|
|
||||||
name: "publish to DockerHub"
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
if: github.repository == 'microsoft/playwright'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: azure/docker-login@v1
|
|
||||||
with:
|
|
||||||
login-server: playwright.azurecr.io
|
|
||||||
username: playwright
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 12
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run build
|
|
||||||
- run: node lib/cli/cli install-deps
|
|
||||||
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
|
|
||||||
- run: ./utils/docker/build.sh focal playwright:localbuild-focal
|
|
||||||
- name: tag & publish
|
|
||||||
run: |
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:next-bionic
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:next
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:sha-${{ github.sha }}
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:next-focal
|
|
||||||
|
|
||||||
34
.github/workflows/publish_release.yml
vendored
34
.github/workflows/publish_release.yml
vendored
@ -42,34 +42,14 @@ jobs:
|
|||||||
AZ_ACCOUNT_KEY: ${{ secrets.AZ_ACCOUNT_KEY }}
|
AZ_ACCOUNT_KEY: ${{ secrets.AZ_ACCOUNT_KEY }}
|
||||||
AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }}
|
AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }}
|
||||||
|
|
||||||
publish-docker-release:
|
trigger-docker-build:
|
||||||
name: "publish to DockerHub"
|
name: "publish to DockerHub"
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
if: github.repository == 'microsoft/playwright'
|
if: github.repository == 'microsoft/playwright'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- run: |
|
||||||
- uses: azure/docker-login@v1
|
curl -X POST \
|
||||||
with:
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
login-server: playwright.azurecr.io
|
-H "Authorization: token ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }}" \
|
||||||
username: playwright
|
--data "{\"event_type\": \"build_docker_production\", \"client_payload\": {\"ref\": \"${{ github.sha }}\"}}" \
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
https://api.github.com/repos/microsoft/playwright-internal/dispatches
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: 12
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run build
|
|
||||||
- run: node lib/cli/cli install-deps
|
|
||||||
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
|
|
||||||
- run: ./utils/docker/build.sh focal playwright:localbuild-focal
|
|
||||||
- name: tag & publish
|
|
||||||
run: |
|
|
||||||
# GITHUB_REF has a form of `refs/tags/v1.3.0`.
|
|
||||||
# TAG_NAME would be `v1.3.0`
|
|
||||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:bionic
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}-bionic
|
|
||||||
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:latest
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:focal
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:${TAG_NAME}
|
|
||||||
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:${TAG_NAME}-focal
|
|
||||||
|
|||||||
26
.github/workflows/trigger_canary_docker.yml
vendored
Normal file
26
.github/workflows/trigger_canary_docker.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: "devrelease:docker"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
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…
x
Reference in New Issue
Block a user