name: "devrelease:docker"

on:
  push:
    branches:
      - main
jobs:
  publish-canary-docker:
    name: "publish to DockerHub"
    runs-on: ubuntu-20.04
    if: github.repository == 'microsoft/playwright-java'
    steps:
    - uses: actions/checkout@v2
    - uses: azure/docker-login@v1
      with:
        login-server: playwright.azurecr.io
        username: playwright
        password: ${{ secrets.DOCKER_PASSWORD }}
    - uses: actions/checkout@v2
    - name: Set up Docker QEMU for arm64 docker builds
      uses: docker/setup-qemu-action@v1
      with:
        platforms: arm64
    - name: publish docker canary
      run: ./utils/docker/publish_docker.sh canary
