forked from MarketSquare/robotframework-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (100 loc) · 3.33 KB
/
dockers.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Docker image and tests
on:
push:
release:
types: [ published ]
workflow_dispatch:
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU for cross-platforms builds
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: marketsquare/robotframework-browser
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
flavor: |
latest=true
- name: Push tag :version_number to Docker Hub
uses: docker/build-push-action@v6
with:
tags: ${{ steps.meta.outputs.tags }}
file: docker/Dockerfile.latest_release
platforms: linux/arm64/v8,linux/amd64
push: ${{ github.event_name != 'push' }}
- name: Docker meta
id: meta_github
uses: docker/metadata-action@v5
with:
images: ghcr.io/marketsquare/robotframework-browser/rfbrowser-stable
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
flavor: |
latest=true
- name: Login to GitHub Container Registry
if: github.event_name != 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Packages
uses: docker/build-push-action@v6
with:
platforms: linux/arm64/v8,linux/amd64
file: docker/Dockerfile.latest_release
tags: ${{ steps.meta_github.outputs.tags }}
push: ${{ github.event_name != 'push' }}
test-docker-image:
needs: docker-image
runs-on: ubuntu-latest
if: github.event_name != 'push'
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install uv
uv pip install wheel --python 3.9 --system
uv pip install -r Browser/dev-requirements.txt --python 3.9 --system
- name: Install invoke deps
run: |
invoke deps
- name: build testing docker image
run: |
invoke docker-tester
- name: set permissions
run: chmod -R 777 atest/
- name: Run tests with latest stable docker image
# continue on error until all docker tests pass
run: |
invoke docker-test
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.node-version }} Clean install results
path: atest/output