From f48676472c22842b51c19821bac4930a23b23070 Mon Sep 17 00:00:00 2001 From: Daan Selen Date: Thu, 27 Nov 2025 23:44:41 +0100 Subject: [PATCH] chore: try to separate matrix --- .github/workflows/docker.yml | 42 ++++++++++++++++++++++++------------ .gitignore | 1 + 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7a3816ea..c8c452e9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,9 +25,11 @@ jobs: fail-fast: false matrix: variant: - - name: modern - arch: linux/amd64,linux/arm64 - - name: legacy + - name: amd64 + arch: linux/amd64 + - name: arm64 + arch: linux/arm64 + - name: armv7 arch: linux/arm/v7 steps: - name: Checkout repository @@ -68,7 +70,7 @@ jobs: type=sha,format=short,prefix= - name: replace psycopg binary to c version for arm/v7 - if: ${{ matrix.variant.name == 'legacy' }} + if: ${{ matrix.variant.name == 'armv7' }} run: | echo "TUNING PSYCOPG FOR ${{ matrix.variant.name }}" sed -i "s|psycopg\[binary\]==3.2.13|psycopg\[c\]==3.2.13|" ./src/requirements.txt @@ -83,7 +85,7 @@ jobs: context: . file: ./docker/Dockerfile push: false - outputs: type=oci,dest=/dist/docker-${{ matrix.variant.name }}.tar + outputs: type=docker,dest=/dist/image-${{ matrix.variant.name }}.tar tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: ${{ matrix.variant.arch }} @@ -91,12 +93,12 @@ jobs: - name: Upload docker image as artifact uses: actions/upload-artifact@v5 with: - name: docker-image-${{ matrix.variant.name }} - path: /dist/docker-${{ matrix.variant.name }}.tar - + name: image-${{ matrix.variant.name }} + path: /dist/image-${{ matrix.variant.name }}.tar + docker_merge: runs-on: ubuntu-latest - needs: docker_build +# needs: docker_build steps: - name: Make workspace directory run: mkdir -p /workspace @@ -106,23 +108,35 @@ jobs: with: path: /workspace - - name: Install unzip + - name: Install dependencies run: | - apt-get update && apt-get install -y unzip + mv /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/microsoft-prod.list.disabled + + apt-get update && apt-get install -y unzip tree - name: List workspace contents run: | cd /workspace - for zip in $(find ./ -type f -name "docker*.zip"); do + + echo "Extracting" + for zip in $(find ./ -type f -name "image-*.zip"); do echo "Found zip: $zip"; unzip $zip done - ls -lah + ls -lah && tree + + echo "Loading" + for tar in $(find ./ -type f -name "image-*.tar"); do + echo "Found zip: $tar"; + docker load -i $tar + done + + docker images docker_scan: if: ${{ github.event_name != 'pull_request' }} runs-on: ubuntu-latest - needs: docker_merger + needs: docker_merge steps: - name: Log in to Docker Hub uses: docker/login-action@v3 diff --git a/.gitignore b/.gitignore index d7e92575..7bfd7528 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.tar .vscode .DS_Store .idea