From f2138ba2b78fd2a12c06d18a594c2e6839a8412b Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 20:03:38 +0000 Subject: [PATCH] fix(ci): build and push correctly --- .gitea/workflows/release.yml | 49 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index d05a8a3..8e0e32a 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -148,31 +148,32 @@ jobs: echo "" printf "Tags:\n${{ steps.meta.outputs.tags }}" - # - name: Build images - # uses: docker/build-push-action@v5 - # with: - # context: . - # push: false - # annotations: ${{ steps.meta.outputs.annotations }} - # labels: ${{ steps.meta.outputs.labels }} - # tags: ${{ steps.meta.outputs.tags }} - - name: Build images - run: | - bldcmd="docker buildx build" - strtags="${{ steps.meta.outputs.tags }}" - strlabels="${{ steps.meta.outputs.labels }}" - strannotations="${{ steps.meta.outputs.annotations }}" - readarray -t tags <<<"$strtags" - readarray -t labels <<<"$strlabels" - readarray -t annotations <<<"$strannotations" - for element in "${tags[@]}"; do bldcmd="$bldcmd --tag \"$element\""; done - for element in "${labels[@]}"; do bldcmd="$bldcmd --label \"$element\""; done - for element in "${annotations[@]}"; do bldcmd="$bldcmd --annotation \"$element\""; done - bldcmd="$bldcmd ${{ gitea.workspace }}" - echo "$bldcmd" - echo "" - sh -c "$bldcmd" + uses: docker/build-push-action@v5 + with: + context: . + push: false + load: true + annotations: ${{ steps.meta.outputs.annotations }} + labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} + + # - name: Build images + # run: | + # bldcmd="docker buildx build --load" + # strtags="${{ steps.meta.outputs.tags }}" + # strlabels="${{ steps.meta.outputs.labels }}" + # strannotations="${{ steps.meta.outputs.annotations }}" + # readarray -t tags <<<"$strtags" + # readarray -t labels <<<"$strlabels" + # readarray -t annotations <<<"$strannotations" + # for element in "${tags[@]}"; do bldcmd="$bldcmd --tag \"$element\""; done + # for element in "${labels[@]}"; do bldcmd="$bldcmd --label \"$element\""; done + # for element in "${annotations[@]}"; do bldcmd="$bldcmd --annotation \"$element\""; done + # bldcmd="$bldcmd ${{ gitea.workspace }}" + # echo "$bldcmd" + # echo "" + # sh -c "$bldcmd" - name: Push images run: |