improve docker builds#258
Conversation
Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
|
I do see an issue here - which is that GitHub doesn't allow workflows run on pull requests access to GitHub Secrets (because workflow PRs can be used to retrieve / display secrets) - meaning all PR builds will fail, as they can't log in to Docker. To get around this, the login step can be skipped on PRs, but this also means that PR builds won't be pushed to the registry. I'll make a commit that does this. |
Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
Signed-off-by: Thaddeus Kuah <tk@tkkr.dev>
|
These changes should skip pushing the image to Docker Hub on PRs. This should mean that PR workflows can run and image building can be tested, but no changes will be pushed, and the images from the different architectures won't be merged. This is the PR I used to test the workflow's |
this PR improves the current docker build workflow, does the following:
pr-[id]and commit sha (short), e.g.,pr-32, etc.)linux/amd64andlinux/arm64, can be customised indocker-bake.hcl)latest, allows users to rollback changes themselvesthis pull request will fix issue #244
sorry, i don't really have a way to test this specific workflow file cause of github secrets, but i do have a version with my own credentials
if anyone wants to test the built image, you can
docker pull ghcr.io/thaddeuskkr/lanyard:selfbuilthttps://github.com/thaddeuskkr/lanyard/tree/selfbuilt