From b7d68d1cdbc226d57b3ba1e35d20f898c8ba9d90 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 13 Jul 2020 16:18:51 -0700 Subject: [PATCH] devops: automate Docker image publishing (#2937) This starts publishing our Docker images using Github Actions: - on every commit, a new image will be pushed, tagged with a SHA of the commit, e.g. `mcr.microsoft.com/playwright:sha-fe997eca88d6de48378b05133dadfe032bd8b0ea` - on every release, a new image will be pushed, tagged with the release version, e.g. `mcr.microsoft.com/playwright:v1.2.1` **Note:** today we don't version our images and instead push them all as `bionic`. This patch retains the tag - along with `latest`. Both `bionic` and `latest` tags will point to the latest release. --- .github/workflows/publish_canary.yml | 10 ++++++++++ .github/workflows/publish_release.yml | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_canary.yml b/.github/workflows/publish_canary.yml index c7d7ca86f7..2241867be7 100644 --- a/.github/workflows/publish_canary.yml +++ b/.github/workflows/publish_canary.yml @@ -26,4 +26,14 @@ jobs: - run: utils/publish_all_packages.sh --tip-of-tree env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: playwright.azurecr.io + repository: microsoft/playwright + path: docs/docker/ + dockerfile: docs/docker/Dockerfile.bionic + tags: dev + tag_with_sha: true diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 1bb9721167..773c415df3 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -23,4 +23,13 @@ jobs: - run: utils/publish_all_packages.sh --release env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - + - uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: playwright.azurecr.io + repository: microsoft/playwright + path: docs/docker/ + dockerfile: docs/docker/Dockerfile.bionic + tags: bionic,latest + tag_with_ref: true