fix(ci): build and push correctly

This commit is contained in:
Luke Tainton 2025-01-02 19:37:55 +00:00
parent a4c1ae8222
commit 9f9f03b521
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -142,31 +142,33 @@ jobs:
- name: Print metadata - name: Print metadata
run: | run: |
echo "Annotations: ${{ steps.meta.outputs.annotations }}\n\n" echo "Annotations: ${{ steps.meta.outputs.annotations }}"
echo "Labels: ${{ steps.meta.outputs.labels }}\n\n" echo ""
echo "Labels: ${{ steps.meta.outputs.labels }}"
echo ""
echo "Tags: ${{ steps.meta.outputs.tags }}" echo "Tags: ${{ steps.meta.outputs.tags }}"
# - name: Build and push images
# uses: docker/build-push-action@v5
# with:
# context: .
# push: true
# 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
dkrannotations="" with:
dkrlabels="" context: .
dkrtags="" push: false
for i in "${{ steps.meta.outputs.annotations }}"; do dkrannotations="$dkrannotations --annotation $i"; done annotations: ${{ steps.meta.outputs.annotations }}
for i in "${{ steps.meta.outputs.labels }}"; do dkrlabels="$dkrlabels --label $i"; done labels: ${{ steps.meta.outputs.labels }}
for i in "${{ steps.meta.outputs.tags }}"; do dkrtags="$dkrtags --tag $i"; done tags: ${{ steps.meta.outputs.tags }}
bldcmd="docker buildx build $dkrannotations $dkrlabels $dkrtags ."
echo $bldcmd # - name: Build images
sh -c "$bldcmd ${{ gitea.workspace }}" # run: |
unset dkrannotations dkrlabels dkrtags bldcmd # dkrannotations=""
# dkrlabels=""
# dkrtags=""
# for i in "${{ steps.meta.outputs.annotations }}"; do dkrannotations="$dkrannotations --annotation $i"; done
# for i in "${{ steps.meta.outputs.labels }}"; do dkrlabels="$dkrlabels --label $i"; done
# for i in "${{ steps.meta.outputs.tags }}"; do dkrtags="$dkrtags --tag $i"; done
# bldcmd="docker buildx build $dkrannotations $dkrlabels $dkrtags ."
# echo $bldcmd
# sh -c "$bldcmd ${{ gitea.workspace }}"
# unset dkrannotations dkrlabels dkrtags bldcmd
- name: Push images - name: Push images
run: | run: |