Workflow: Simplify Windows Docker build by using image defaults
This commit is contained in:
@@ -40,15 +40,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Windows executable via Docker (Modern)
|
- name: Build Windows executable via Docker (Stable)
|
||||||
run: |
|
run: |
|
||||||
# Use a modern Python 3.12 image for Windows cross-compilation
|
# Use a standard Wine-based PyInstaller image
|
||||||
docker create --name builder --entrypoint /bin/sh tobix/pyinstaller-windows:py312 -c "pip install --upgrade pip && pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
|
docker create --name builder cdrx/pyinstaller-windows
|
||||||
|
|
||||||
# Copy source code into the container
|
# Copy source code into the container
|
||||||
docker cp . builder:/src
|
docker cp . builder:/src
|
||||||
|
|
||||||
# Start the container and wait
|
# Run the build using the image's internal logic but specifying our requirements
|
||||||
|
# Most of these images default to running 'pyinstaller' on the /src folder
|
||||||
docker start -a builder
|
docker start -a builder
|
||||||
|
|
||||||
# Copy the results back
|
# Copy the results back
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build Windows executable via Docker (Modern)
|
- name: Build Windows executable via Docker (Stable)
|
||||||
run: |
|
run: |
|
||||||
docker create --name release_builder --entrypoint /bin/sh tobix/pyinstaller-windows:py312 -c "pip install --upgrade pip && pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
|
docker create --name release_builder cdrx/pyinstaller-windows
|
||||||
docker cp . release_builder:/src
|
docker cp . release_builder:/src
|
||||||
docker start -a release_builder
|
docker start -a release_builder
|
||||||
docker cp release_builder:/src/dist .
|
docker cp release_builder:/src/dist .
|
||||||
|
|||||||
Reference in New Issue
Block a user