From 84a0066c9fa73921a4e50e9baa58d484fc27cca9 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 2 Sep 2020 23:33:09 -0700 Subject: [PATCH] devops: align release publishing of docker image with dev releases (#3725) This patch starts using the same approach to docker publishing that we currently use to publish canary docker images. --- .github/workflows/publish_release.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 775090ce811d7..a77da4d98a6b6 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -29,19 +29,23 @@ jobs: 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: microsoft/playwright-github-action@v1 - uses: actions/setup-node@v1 with: node-version: 10.15 - run: npm ci - run: npm run build - - run: ./docs/docker/build.sh --prepare-context - - uses: docker/build-push-action@v1 - with: - username: playwright - password: ${{ secrets.DOCKER_PASSWORD }} - registry: playwright.azurecr.io - repository: public/playwright - path: docs/docker/ - dockerfile: docs/docker/Dockerfile.bionic - tags: bionic,latest - tag_with_ref: true + - run: ./docs/docker/build.sh + - 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/} + ./docs/docker/tag_and_push.sh playwright.azurecr.io/public/playwright:latest + ./docs/docker/tag_and_push.sh playwright.azurecr.io/public/playwright:bionic + ./docs/docker/tag_and_push.sh playwright.azurecr.io/public/playwright:${TAG_NAME}