Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/addon-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,30 @@ jobs:
rm -rf /tmp/.docker-cache
mv /tmp/.docker-cache-new /tmp/.docker-cache
- name: 🚀 Push
# yamllint disable rule:line-length
run: |
docker push \
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}"
docker push \
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
Comment on lines -174 to -179
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following why this part needs to go?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because push is done through outputs: parameter to docker/build-push-action step.

uses: docker/build-push-action@v6.18.0
with:
outputs: type=image,oci-mediatypes=true,compression=zstd,push=true
# yamllint disable rule:line-length
tags: |
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}
# yamllint enable rule:line-length
context: ${{ needs.information.outputs.target }}
Comment on lines +174 to +182
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need to build it again, this step only pushes out the tags.

Copy link
Author

@slonopotamus slonopotamus Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I need to invoke docker/build-push-action with outputs: flag. So I need to pass it list of tags, build context and etc. Otherwise, it will build and push something different.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you want to revise your decision about splitting build and push? That would remove lots of copy-pasting. Is it really a common case when build succeeds but pushing fails and you still want to save the cache?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I need to invoke docker/build-push-action with outputs: flag.

We can use docker directly.

Maybe you want to revise your decision about splitting build and push?

Nope. I explained the reasoning earlier. I think think being able to really on cache is better than the speed bump added in this PR.

It is a nice improvement, but not something I think is important enough to drop other things for. In the end, if this really was the best and critical option, it would have been the default in Docker.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use docker directly.

docker push doesn't allow configuring compression method, that's why I have to go the route I went.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, I am going to friendly decline this contribution. Honestly, the juice is not worth the squeeze imho.

Especially, since it doesn’t solve an actual issue we are experiencing.

Nevertheless, thanks for being willing to contribute.

../Frenck

file: ${{ needs.information.outputs.target }}/Dockerfile
cache-from: |
type=local,src=/tmp/.docker-cache
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:edge
cache-to: type=local,mode=max,dest=/tmp/.docker-cache-new
platforms: ${{ steps.flags.outputs.platform }}
build-args: |
BUILD_ARCH=${{ matrix.architecture }}
BUILD_DATE=${{ steps.flags.outputs.date }}
BUILD_DESCRIPTION=${{ needs.information.outputs.description }}
BUILD_FROM=${{ steps.flags.outputs.from }}
BUILD_NAME=${{ needs.information.outputs.name }}
BUILD_REF=${{ github.sha }}
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=${{ needs.information.outputs.version }}

publish-edge:
name: 📢 Publish to edge repository
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/base-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,28 @@ jobs:
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=${{ needs.information.outputs.version }}
- name: 🚀 Push
# yamllint disable rule:line-length
run: |
docker push \
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}"
docker push \
"ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}"
uses: docker/build-push-action@v6.18.0
with:
outputs: type=image,oci-mediatypes=true,compression=zstd,push=true
# yamllint disable rule:line-length
tags: |
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.environment }}
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:${{ needs.information.outputs.version }}
# yamllint enable rule:line-length
context: ${{ needs.information.outputs.target }}
file: ${{ needs.information.outputs.target }}/Dockerfile
cache-from: |
type=local,src=/tmp/.docker-cache
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:edge
cache-to: type=local,mode=max,dest=/tmp/.docker-cache
platforms: ${{ steps.flags.outputs.platform }}
build-args: |
BUILD_ARCH=${{ matrix.architecture }}
BUILD_DATE=${{ steps.flags.outputs.date }}
BUILD_FROM=${{ steps.flags.outputs.from }}
BUILD_REF=${{ github.sha }}
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=${{ needs.information.outputs.version }}

manifest:
name: 👷 Build & Deploy Multi Arch Manifest
Expand Down