Compare commits
1 Commits
c680c10d2d
...
17618483c0
Author | SHA1 | Date | |
---|---|---|---|
17618483c0 |
@ -140,43 +140,11 @@ jobs:
|
||||
${{ vars.PACKAGES_REGISTRY_URL }}/${{ gitea.repository }}
|
||||
tags: type=semver,pattern=v{{version}},value=${{ needs.create_release.outputs.release_name }}
|
||||
|
||||
- name: Print metadata
|
||||
run: |
|
||||
printf "Annotations:\n${{ steps.meta.outputs.annotations }}"
|
||||
echo ""
|
||||
printf "Labels:\n${{ steps.meta.outputs.labels }}"
|
||||
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"
|
||||
|
||||
- name: Push images
|
||||
run: |
|
||||
strtags="${{ steps.meta.outputs.tags }}"
|
||||
readarray -t lines <<<"$strtags"
|
||||
for element in "${lines[@]}"; do docker push "$element"; done
|
||||
unset strtags lines
|
||||
- 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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user