As the above commit uses a deprecated way to share output between steps, I replaced that with the new way things should work in commit https://github.com/brennerm/uptimerobot-operator/commit/7b58ccb99d5101276467bffe4cec8e10bc9814ab to make sure it will still work after June 1st (see Githubs blog post here) and I bumped the login action to v2 because I hat issues (but the issues have been caused by something else, so change that back if you want)
I replaced the docker build step and the two docker push steps with the build-push-action from Docker. This action can do both in one, and also supports multiple architectures. For the multiple architectures to work, the setup-qemu-action and setup-buildx-action are necessary (Lines 50-53).
To replicate the former behavior of the two push steps, I created the step set tags (Line 54-68) which should eventually output the same tags as before.
What's included but not absolutely necessary:
I replaced ${{ secrets.CR_PAT }} with ${{ secrets.GITHUB_TOKEN }} as that token is default available and can be used to push stuff into ghcr.io and I was to lazy to create an additional token.
The labels (Line 84ff) are not mandatory, but I used to label my images and I copied that from one of my workflows.
Feel free to revert those two things if you don't like them.
In general, I tried to stick as close as possible to what already existed. Therefore I (mostly) avoided bumping actions to newer versions or the bump the base image to a newer version. These are things you should consider, as some stuff is quite outdated.
I'm no Python developer, so I hope my pipenv changes are okay. At least the container was building and I was able to spin it up on a K3S on ARM here. But I wasn't able to perform the E2E tests from your pipeline, although I added my API key.
Hope that PR is okay, otherwise please let me know if you wish changes to it.
The main reason for this PR is to fix #27 as I'm need arm images ;-)
This PR consists of four changes:
About the changes of the commit https://github.com/brennerm/uptimerobot-operator/commit/4b31c174800f07bb9d3adae3ce4d2605d19c615e
I replaced the
docker build
step and the twodocker push
steps with thebuild-push-action
from Docker. This action can do both in one, and also supports multiple architectures. For the multiple architectures to work, thesetup-qemu-action
andsetup-buildx-action
are necessary (Lines 50-53).To replicate the former behavior of the two push steps, I created the step
set tags
(Line 54-68) which should eventually output the same tags as before.What's included but not absolutely necessary:
${{ secrets.CR_PAT }}
with${{ secrets.GITHUB_TOKEN }}
as that token is default available and can be used to push stuff into ghcr.io and I was to lazy to create an additional token.Feel free to revert those two things if you don't like them.
In general, I tried to stick as close as possible to what already existed. Therefore I (mostly) avoided bumping actions to newer versions or the bump the base image to a newer version. These are things you should consider, as some stuff is quite outdated.
I'm no Python developer, so I hope my pipenv changes are okay. At least the container was building and I was able to spin it up on a K3S on ARM here. But I wasn't able to perform the E2E tests from your pipeline, although I added my API key.
Hope that PR is okay, otherwise please let me know if you wish changes to it.