fix(ci): build and push correctly

This commit is contained in:
Luke Tainton 2025-01-02 20:03:38 +00:00
parent b5b3388a98
commit f2138ba2b7
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -148,31 +148,32 @@ jobs:
echo "" echo ""
printf "Tags:\n${{ steps.meta.outputs.tags }}" 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 - name: Build images
run: | uses: docker/build-push-action@v5
bldcmd="docker buildx build" with:
strtags="${{ steps.meta.outputs.tags }}" context: .
strlabels="${{ steps.meta.outputs.labels }}" push: false
strannotations="${{ steps.meta.outputs.annotations }}" load: true
readarray -t tags <<<"$strtags" annotations: ${{ steps.meta.outputs.annotations }}
readarray -t labels <<<"$strlabels" labels: ${{ steps.meta.outputs.labels }}
readarray -t annotations <<<"$strannotations" tags: ${{ steps.meta.outputs.tags }}
for element in "${tags[@]}"; do bldcmd="$bldcmd --tag \"$element\""; done
for element in "${labels[@]}"; do bldcmd="$bldcmd --label \"$element\""; done # - name: Build images
for element in "${annotations[@]}"; do bldcmd="$bldcmd --annotation \"$element\""; done # run: |
bldcmd="$bldcmd ${{ gitea.workspace }}" # bldcmd="docker buildx build --load"
echo "$bldcmd" # strtags="${{ steps.meta.outputs.tags }}"
echo "" # strlabels="${{ steps.meta.outputs.labels }}"
sh -c "$bldcmd" # 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 - name: Push images
run: | run: |