Skip to content

Commit b7d68d1

Browse files
authored
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.
1 parent 65d45c1 commit b7d68d1

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/publish_canary.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,14 @@ jobs:
2626
- run: utils/publish_all_packages.sh --tip-of-tree
2727
env:
2828
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
- uses: docker/build-push-action@v1
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
registry: playwright.azurecr.io
34+
repository: microsoft/playwright
35+
path: docs/docker/
36+
dockerfile: docs/docker/Dockerfile.bionic
37+
tags: dev
38+
tag_with_sha: true
2939

.github/workflows/publish_release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,13 @@ jobs:
2323
- run: utils/publish_all_packages.sh --release
2424
env:
2525
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26-
26+
- uses: docker/build-push-action@v1
27+
with:
28+
username: ${{ secrets.DOCKER_USERNAME }}
29+
password: ${{ secrets.DOCKER_PASSWORD }}
30+
registry: playwright.azurecr.io
31+
repository: microsoft/playwright
32+
path: docs/docker/
33+
dockerfile: docs/docker/Dockerfile.bionic
34+
tags: bionic,latest
35+
tag_with_ref: true

0 commit comments

Comments
 (0)