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 ""
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: |