-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (64 loc) · 1.97 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
PYTHON: [3.8.13, 3.8.16, 3.9.16, 3.10.9, 3.11.1, 3.12.0]
PLAYWRIGHT: [1.23.0, 1.29.1]
steps:
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Git Checkout
uses: actions/checkout@v2
-
name: Docker Setup QEMU
uses: docker/[email protected]
-
uses: docker/setup-buildx-action@v1
id: buildx
with:
install: true
-
name: Build and push with Buildx
run: docker build --platform linux/amd64,linux/arm64 . --tag jungsoft/playwright-python:${{ matrix.PYTHON }}-${{ matrix.PLAYWRIGHT }} --push
env:
PYTHON_VERSION: ${{ matrix.PYTHON }}
PLAYWRIGHT_VERSION: ${{ matrix.PLAYWRIGHT }}
retag_python:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8.13, 3.8.16, 3.9.16, 3.10.9, 3.11.1, 3.12.0]
steps:
- name: Retag to latest playwright
uses: tinact/docker.image-retag@master
with:
image_name: jungsoft/playwright-python
image_old_tag: ${{ matrix.PYTHON }}-1.29.1
image_new_tag: ${{ matrix.PYTHON }}
registry_username: ${{ secrets.DOCKERHUB_USERNAME }}
registry_password: ${{ secrets.DOCKERHUB_TOKEN }}
retag_latest:
needs: build
runs-on: ubuntu-latest
steps:
- name: Retag to latest
uses: tinact/docker.image-retag@master
with:
image_name: jungsoft/playwright-python
image_old_tag: 3.12.0-1.29.1
image_new_tag: latest
registry_username: ${{ secrets.DOCKERHUB_USERNAME }}
registry_password: ${{ secrets.DOCKERHUB_TOKEN }}