Skip to content

Commit

Permalink
ci: Add commands to copy build from container to host and archive it
Browse files Browse the repository at this point in the history
  • Loading branch information
nemuelw committed Nov 12, 2024
1 parent b257aab commit 7461bcc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ jobs:
- name: Run Docker image
run: |
docker run --rm -v $(pwd)/dist:/app/dist --name protodesk-container protodesk
docker run --name protodesk-container protodesk
- name: Copy build from container to host
run: |
docker cp protodesk-container:/app/dist ./dist
- name: Create a versioned archive of the build
run: |
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,16 @@ jobs:
- name: Build Docker image
run: |
docker build --platform linux/${{ matrix.arch }} -t protodesk .
docker rmi protodesk
- name: Run Docker image
run: |
docker run --name protodesk-container protodesk
- name: Copy build from container to host
run: |
docker cp protodesk-container:/app/dist ./dist
- name: Create an archive of the build
run: |
cd dist && tar -czf protodesk.tar.gz app/
ls -l
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ RUN poetry install --no-root

# build the application with Pyinstaller
RUN poetry run pyinstaller app.spec

# confirm that the app is indeed built
RUN ls -l /app/dist
RUN ls -l /app/dist/app

0 comments on commit 7461bcc

Please sign in to comment.