2022-01-11 01:05:48 +03:00
|
|
|
name: "publish release - Docker"
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2022-01-15 04:32:40 +03:00
|
|
|
inputs:
|
|
|
|
is_release:
|
2022-02-24 20:10:34 +03:00
|
|
|
required: true
|
2022-01-15 04:32:40 +03:00
|
|
|
type: boolean
|
|
|
|
description: "Is this a release image?"
|
|
|
|
|
2022-01-11 01:05:48 +03:00
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
2023-04-06 20:49:29 +03:00
|
|
|
env:
|
|
|
|
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
|
|
|
|
2022-01-11 01:05:48 +03:00
|
|
|
jobs:
|
|
|
|
publish-docker-release:
|
|
|
|
name: "publish to DockerHub"
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
if: github.repository == 'microsoft/playwright'
|
|
|
|
steps:
|
2022-08-31 18:23:42 +03:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
2022-01-11 01:05:48 +03:00
|
|
|
with:
|
2023-10-06 02:08:43 +03:00
|
|
|
node-version: 18
|
2022-01-11 01:05:48 +03:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- uses: azure/docker-login@v1
|
|
|
|
with:
|
|
|
|
login-server: playwright.azurecr.io
|
|
|
|
username: playwright
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Set up Docker QEMU for arm64 docker builds
|
2023-03-13 20:38:09 +03:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-01-11 01:05:48 +03:00
|
|
|
with:
|
|
|
|
platforms: arm64
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
|
|
|
- run: npx playwright install-deps
|
|
|
|
- run: ./utils/docker/publish_docker.sh stable
|
2022-01-15 05:11:35 +03:00
|
|
|
if: (github.event_name != 'workflow_dispatch' && !github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release == 'true')
|
2022-01-14 17:04:40 +03:00
|
|
|
- run: ./utils/docker/publish_docker.sh canary
|
2022-01-15 05:11:35 +03:00
|
|
|
if: (github.event_name != 'workflow_dispatch' && github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release != 'true')
|