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.
40 lines
938 B
YAML
40 lines
938 B
YAML
name: "canary"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
|
|
env:
|
|
CI: true
|
|
|
|
jobs:
|
|
publish-canary:
|
|
name: "publish"
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- uses: microsoft/playwright-github-action@v1
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- run: node utils/update_version.js --next
|
|
- 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
|
|
|