-
Notifications
You must be signed in to change notification settings - Fork 173
70 lines (58 loc) · 1.8 KB
/
template.yml
File metadata and controls
70 lines (58 loc) · 1.8 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
name: Build and push Desktop template
on:
push:
paths:
- 'template/**'
- '.github/workflows/template.yml'
branches:
- main
permissions:
contents: read
jobs:
buildAndPublish:
defaults:
run:
working-directory: ./template
name: Build and Push Images
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Parse .tool-versions
uses: wistia/parse-tool-versions@v2.1.1
id: tool-versions
with:
filename: '.tool-versions'
uppercase: 'true'
prefix: 'tool_version_'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.TOOL_VERSION_POETRY }}
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: poetry install
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to DockerHub
run: |
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/desktop:latest || true
poetry run python build_docker.py | docker buildx build \
--platform linux/amd64 \
--push \
--tag ${{ secrets.DOCKERHUB_USERNAME }}/desktop:latest -f - files
- name: Build E2B template
run: poetry run python build_prod.py
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}