Skip to content

Commit

Permalink
devops: align release publishing of docker image with dev releases
Browse files Browse the repository at this point in the history
This patch starts using the same approach to docker publishing that we
currently use to publish canary docker images.
  • Loading branch information
aslushnikov committed Sep 2, 2020
1 parent 47ea1e0 commit 86d584d
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,27 @@ 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: 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
- name: docker - build & publish
run: |
# build docker image
./docs/docker/build.sh
# GITHUB_REF has a form of `refs/tags/v1.3.0`.
# TAG_NAME would be `v1.3.0`
export TAG_NAME=${GITHUB_REF#refs/tags/}
docker tag playwright:localbuild playwright.azurecr.io/public/playwright:latest
docker tag playwright:localbuild playwright.azurecr.io/public/playwright:bionic
docker tag playwright:localbuild playwright.azurecr.io/public/playwright:${TAG_NAME}
docker rmi playwright:localbuild
# push image to registry
docker push playwright.azurecr.io/public/playwright:latest

0 comments on commit 86d584d

Please sign in to comment.