fix(ci): manually build and push images

This commit is contained in:
Luke Tainton 2025-01-02 19:05:19 +00:00
parent fb35156a28
commit 9375ae10c3
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -140,11 +140,33 @@ jobs:
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}
tags: type=semver,pattern=v{{version}},value=${{ needs.create_release.outputs.release_name }}
- 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 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
run: |
readarray -td, anno < <( echo ${{ steps.meta.outputs.annotations }} )
readarray -td, lbls < <( echo ${{ steps.meta.outputs.labels }} )
readarray -td, tags < <( echo ${{ steps.meta.outputs.tags }} )
dkrannotations=""
dkrlabels=""
dkrtags=""
for i in "${anno[@]}"; do dkrannotations="$dkrannotations --annotation $i"; done
for i in "${lbls[@]}"; do dkrlabels="$dkrlabels --label $i"; done
for i in "${tags[@]}"; do dkrtags="$dkrtags --tag $i"; done
bldcmd="docker buildx build $dkrannotations $dkrlabels $dkrtags ."
echo "$bldcmd"
$bldcmd
unset anno dkrannotations lbls dkrlabels tags dkrtags bldcmd
- name: Push images
run: |
readarray -td, tags < <( echo ${{ steps.meta.outputs.tags }} )
for i in "${tags[@]}"; do docker push "$i"; done
unset tags