Workflow: Simplify Windows Docker build by using image defaults
This commit is contained in:
@@ -40,15 +40,16 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build Windows executable via Docker (Modern)
|
||||
- name: Build Windows executable via Docker (Stable)
|
||||
run: |
|
||||
# Use a modern Python 3.12 image for Windows cross-compilation
|
||||
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"
|
||||
# Use a standard Wine-based PyInstaller image
|
||||
docker create --name builder cdrx/pyinstaller-windows
|
||||
|
||||
# Copy source code into the container
|
||||
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
|
||||
|
||||
# Copy the results back
|
||||
|
||||
@@ -34,9 +34,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Windows executable via Docker (Modern)
|
||||
- name: Build Windows executable via Docker (Stable)
|
||||
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 start -a release_builder
|
||||
docker cp release_builder:/src/dist .
|
||||
|
||||
Reference in New Issue
Block a user