forked from minitap-ai/mobile-use
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (78 loc) · 2.48 KB
/
Copy pathdeployment.yml
File metadata and controls
91 lines (78 loc) · 2.48 KB
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
name: Deployment 🚀
on:
push:
tags: [ "v*" ]
jobs:
verify-tag:
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Get package version
run: |
PACKAGE_VERSION="$(uv run python -c 'import tomllib; print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')"
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
- name: Check tag version
uses: minitap-ai/devops-common/.github/actions/check-tag-version@v1
with:
expected-tag-version: ${{ env.PACKAGE_VERSION }}
dockerhub:
runs-on: ubuntu-latest
needs: verify-tag
permissions:
contents: read
environment:
name: DockerHub
url: https://hub.docker.com/r/minitap/mobile-use
steps:
- name: Clone the repository
uses: actions/checkout@v5
- uses: minitap-ai/devops-common/.github/actions/dockerhub-build-push@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: minitap/${{ vars.IMAGE_NAME }}
dockerfile: ${{ github.workspace }}/Dockerfile
docker-gcp:
runs-on: ubuntu-latest
needs: verify-tag
permissions:
contents: read
environment: GCP
steps:
- name: Clone the repository
uses: actions/checkout@v5
- uses: minitap-ai/devops-common/.github/actions/gcp-docker-build-push@v1
with:
gcp-credentials: ${{ secrets.GCP_SA_KEY }}
gcp-project-id: ${{ vars.GCP_PROJECT_ID }}
gcp-region: ${{ vars.GCP_REGION }}
gcp-artifact-repo: ${{ vars.GCP_ARTIFACT_REPO }}
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: ${{ vars.IMAGE_NAME }}-slim
dockerfile: ${{ github.workspace }}/slim.Dockerfile
pypi:
runs-on: ubuntu-latest
needs: verify-tag
permissions:
contents: read
id-token: write
environment:
name: PyPI
url: https://pypi.org/project/minitap-mobile-use/
steps:
- name: Clone the repository
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Build package
run: uv build
- name: Publish package
run: uv publish