diff --git a/.github/workflows/publish_canary_docker.yml b/.github/workflows/publish_canary_docker.yml deleted file mode 100644 index c8d90d46a3..0000000000 --- a/.github/workflows/publish_canary_docker.yml +++ /dev/null @@ -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 - diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index e462cbf7bd..ca96e45f62 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -42,34 +42,14 @@ jobs: AZ_ACCOUNT_KEY: ${{ secrets.AZ_ACCOUNT_KEY }} AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }} - publish-docker-release: + trigger-docker-build: 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: | - # 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 + - 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_production\", \"client_payload\": {\"ref\": \"${{ github.sha }}\"}}" \ + https://api.github.com/repos/microsoft/playwright-internal/dispatches diff --git a/.github/workflows/trigger_canary_docker.yml b/.github/workflows/trigger_canary_docker.yml new file mode 100644 index 0000000000..87e26fcabd --- /dev/null +++ b/.github/workflows/trigger_canary_docker.yml @@ -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