From 678cbba120d4fb137f6bef1b2e9825e4a6656521 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 7 Feb 2024 21:12:24 -0600 Subject: [PATCH] Matrix pls --- .forgejo/workflows/publish.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index 7384fd1..5db6356 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -46,7 +46,7 @@ jobs: strategy: matrix: fail-fast: false - include: + info: - target: x86_64-unknown-linux-musl artifact: linux-amd64 platform: linux/amd64 @@ -73,21 +73,21 @@ jobs: "aarch64-unknown-linux-musl"] - name: Compile pict-rs - run: cargo zigbuild --target ${{ matrix.target }} --release + run: cargo zigbuild --target ${{ matrix.info.target }} --release - name: Prepare artifacts run: | mkdir artifacts - cp target/${{ matrix.target }}/release/pict-rs artifacts/pict-rs-${{ matrix.artifact }} + cp target/${{ matrix.info.target }}/release/pict-rs artifacts/pict-rs-${{ matrix.info.artifact }} - uses: actions/upload-artifact@v3 with: - name: ${{ matrix.artifact }} + name: ${{ matrix.info.artifact }} path: artifacts/ - name: Prepare Platform run: | - platform=${{ matrix.platform }} + platform=${{ matrix.info.platform }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - name: Docker meta @@ -109,13 +109,13 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Prepare binary - run: cp target/${{ matrix.target }}/release/pict-rs docker/forgejo/pict-rs + run: cp target/${{ matrix.info.target }}/release/pict-rs docker/forgejo/pict-rs - - name: Build and push ${{ matrix.platform }} docker image + name: Build and push ${{ matrix.info.platform }} docker image uses: docker/build-push-action@v5 with: context: ./docker/forgejo" - platforms: ${{ matrix.platform }} + platforms: ${{ matrix.info.platform }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true - @@ -125,7 +125,7 @@ jobs: digest="${{ steps.build.outputs.digest }}" touch "/tmp/digests/${digest#sha256:}" - - name: Upload ${{ matrix.platform }} digest + name: Upload ${{ matrix.info.platform }} digest uses: actions/upload-artifact@v3 with: name: digests