Workflow: Fix shell variable expansion for Windows container naming
Some checks failed
Build Tamigo CLI / Build Linux Binary (push) Successful in 52s
Build Tamigo CLI / Build Windows Binary (push) Failing after 7s

This commit is contained in:
Daniel Dybing
2026-03-11 15:54:34 +01:00
parent eb845563a7
commit fd8f7a13d5

View File

@@ -37,7 +37,7 @@ jobs:
- name: Build Windows executable (Self-Built Environment) - name: Build Windows executable (Self-Built Environment)
run: | run: |
# 1. Create a local Dockerfile for a guaranteed working environment # 1. Create a local Dockerfile
cat <<EOF > Dockerfile.win cat <<EOF > Dockerfile.win
FROM python:3.10-slim FROM python:3.10-slim
RUN apt-get update && apt-get install -y wine binutils-mingw-w64-x86-64 && apt-get clean RUN apt-get update && apt-get install -y wine binutils-mingw-w64-x86-64 && apt-get clean
@@ -45,19 +45,20 @@ jobs:
WORKDIR /src WORKDIR /src
EOF EOF
# 2. Build the local image # 2. Build local image
docker build -t local-win-builder -f Dockerfile.win . docker build -t local-win-builder -f Dockerfile.win .
# 3. Create container and copy files # 3. Use unique container name (Fixed shell variable expansion)
CONTAINER_NAME="win-build-${{ github.run_id }}" CONTAINER_NAME="win-build-${{ github.run_id }}"
docker create --name \$CONTAINER_NAME local-win-builder sh -c "pyinstaller --onefile --name tamigo-cli tamigo.py"
docker cp . \$CONTAINER_NAME:/src docker create --name $CONTAINER_NAME local-win-builder sh -c "pyinstaller --onefile --name tamigo-cli tamigo.py"
docker cp . $CONTAINER_NAME:/src
# 4. Start build and extract # 4. Start build and extract
docker start -a \$CONTAINER_NAME docker start -a $CONTAINER_NAME
mkdir -p win_dist mkdir -p win_dist
docker cp \$CONTAINER_NAME:/src/dist/. ./win_dist/ docker cp $CONTAINER_NAME:/src/dist/. ./win_dist/
docker rm \$CONTAINER_NAME docker rm $CONTAINER_NAME
- name: Debug - List Files - name: Debug - List Files
if: always() if: always()