homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.59k stars 243 forks source link

Refactor GitHub Actions workflow to make use of Docker actions #533

Closed rafaelgaspar closed 12 months ago

rafaelgaspar commented 12 months ago

:recycle: Current situation

Currently the workflow uses too many manual run commands for things that would be better handled by available official actions. More specifically for Docker.

One consequence of this is that the workflow is not cleaning up after itself.

:bulb: Proposed solution

By using the official Docker actions you can abstract the internals of building multi-arch images and not have to deal with it's implications, like for example cleanup.

:gear: Release Notes

:heavy_plus_sign: Additional Information

Testing the build and output image from forks

I also added support for the image to be built and pushed for the forks, inside the fork image repository, this makes testing/debugging a PR much easier since you actually have an output image to test.

See: https://github.com/rafaelgaspar/docker-homebridge/pkgs/container/homebridge https://github.com/rafaelgaspar/docker-homebridge/actions/runs/6994414294/job/19028147356

This off-course only pushes to GHCR and not DockerHub.

Reviewer Nudging

Left some questions in the PR that would be nice to know in order to better refactor those.

NorthernMan54 commented 12 months ago

Which one of the 2 PR's do you want merged ?

rafaelgaspar commented 12 months ago

Which one of the 2 PR's do you want merged ?

This one includes a few extra changes, and there is few open question above that it would be nice if you could answer, but apart from that, yep, this PR also cover the other one plus extra refactoring.

NorthernMan54 commented 12 months ago

I thought I had answered the questions