Skip to content

Commit

Permalink
Adding build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alterakey committed Nov 26, 2023
1 parent 9579ba5 commit cb13c09
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.git
.venv
trueseeing
dist
36 changes: 36 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: deploy

on:
push:
branches: [master]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup environment
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Check out code
uses: actions/checkout@v3

- name: Building and pushing container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: alterakey/trueseeing:latest
platforms: linux/amd64,linux/arm64
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from python:3.12-alpine
run pip install flit
copy . /tmp/build/
run (cd /tmp/build && flit build)

from python:3.12-alpine
run apk add --no-cache openjdk17-jre-headless zip android-tools
run mkdir /data /cache /out && ln -sfn /cache /root/.local
arg dist
copy $dist /tmp/dist/
copy --from=0 /tmp/build/dist/*.whl /tmp/dist/
run pip install /tmp/dist/*.whl && rm -rf /tmp/dist
env PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env TS2_IN_DOCKER=1
Expand Down

0 comments on commit cb13c09

Please sign in to comment.