|
28 | 28 | TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
29 | 29 | TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
30 | 30 | run: twine upload dist/*
|
31 |
| - publish-docker: |
32 |
| - name: "publish to DockerHub" |
33 |
| - runs-on: ubuntu-20.04 |
34 |
| - if: github.repository == 'microsoft/playwright-python' |
35 |
| - steps: |
36 |
| - - uses: actions/checkout@v2 |
37 |
| - - uses: azure/docker-login@v1 |
38 |
| - with: |
39 |
| - login-server: playwright.azurecr.io |
40 |
| - username: playwright |
41 |
| - password: ${{ secrets.DOCKER_PASSWORD }} |
42 |
| - - uses: microsoft/playwright-github-action@v1 |
43 |
| - - name: Set up Python |
44 |
| - uses: actions/setup-python@v2 |
45 |
| - with: |
46 |
| - python-version: 3.8 |
47 |
| - - name: Install dependencies |
48 |
| - run: | |
49 |
| - python -m pip install --upgrade pip |
50 |
| - pip install -r local-requirements.txt |
51 |
| - pip install -e . |
52 |
| - - name: Build package |
53 |
| - run: python setup.py bdist_wheel |
54 |
| - - name: Install |
55 |
| - run: python -m playwright install |
56 |
| - - name: Build Docker image |
57 |
| - run: docker build -t playwright-python:localbuild . |
58 |
| - - name: tag & publish |
59 |
| - run: | |
60 |
| - # GITHUB_REF has a form of `refs/tags/v1.3.0`. |
61 |
| - # TAG_NAME would be `v1.3.0` |
62 |
| - TAG_NAME=${GITHUB_REF#refs/tags/} |
63 |
| - ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:latest |
64 |
| - ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:${TAG_NAME} |
65 |
| -
|
66 |
| - ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:focal |
67 |
| - ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:${TAG_NAME}-focal |
0 commit comments