From cd5f999cdab718f10c74d6b8f70fb4edfb5a32d6 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Tue, 31 Dec 2024 12:15:13 +0100 Subject: [PATCH] Use docker images directly instead of dind --- .forgejo/workflows/build_all.yaml | 42 +++++-------------------------- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/.forgejo/workflows/build_all.yaml b/.forgejo/workflows/build_all.yaml index 3fda450..00d0fa2 100644 --- a/.forgejo/workflows/build_all.yaml +++ b/.forgejo/workflows/build_all.yaml @@ -68,27 +68,15 @@ jobs: if: ${{ github.event.inputs.build == 'all' || github.event.inputs.build == 'windows' }} runs-on: docker container: - image: ghcr.io/catthehacker/ubuntu:act-22.04 + image: batonogov/pyinstaller-windows:latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Run Docker Container + - name: Build with PyInstaller run: | - docker run --rm \ - --volume "${{ github.workspace }}:/src/" \ - --env SPECFILE=./BTClockOTA.spec \ - batonogov/pyinstaller-windows:latest + python -m PyInstaller $SPECFILE - name: Archive artifacts uses: actions/upload-artifact@v4 with: @@ -98,33 +86,15 @@ jobs: if: ${{ github.event.inputs.build == 'all' || github.event.inputs.build == 'linux' }} runs-on: docker container: - image: ghcr.io/catthehacker/ubuntu:act-22.04 + image: ghcr.io/btclock/pyinstaller-wxpython-linux:latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Run Docker Container + - name: Build with PyInstaller run: | - docker run --rm \ - --volume "${{ github.workspace }}:/src/" \ - --env SPECFILE=./BTClockOTA.spec \ - ghcr.io/btclock/pyinstaller-wxpython-linux:latest && + python -m PyInstaller $SPECFILE && mv dist/BTClockOTA dist/BTClockOTA-linux-amd64 - name: Archive artifacts uses: actions/upload-artifact@v4