multi-arch image support: amd64 + arm64
Addresses https://github.com/coleifer/sqlite-web/issues/185
Sample run can be found at https://github.com/dir01/sqlite-web/actions/runs/16426825187/job/46419088554
Please let me know if you are in general satisfied with this approach and I'm going to test stuff like "does the cache work" and "does it work as expected when we create a new tag"
Nice, what all did you need to set up in the action environment or settings? I am practically illiterate about all this stuff. I think I have the current image building set-up to do a separate release for "latest" (current commit) and whenever there is a release tag -- do you know how that will work if it builds on every push? Thanks for putting in the effort on this, I know it will make people happy to see it merged.
Thanks for the project, it's exactly what I was looking for
I had to issue a new token (Settings -> Developer Settings -> Personal Access Tokens -> Generate New Token (Classic) -> [v] write:package) and then set it up in (Repo Settings -> Secrets and Variables -> Actions -> Repository Secrets -> New Repository Secret -> [use "GHCR_TOKEN" as key]
In your current setup, however, everything seems to be working just fine with default GITHUB_TOKEN, so I would first try to rename GHCR_TOKEN to GITHUB_TOKEN and see if it does the trick. For me it does not for some reason, for you it apparently does, so 🤷
There is another issue, both with my proposed solution and with your current setup
I've inspected the dockerfile, and it contains no dependencies on the contents of this repository, which means two things, as far as I understand:
-
In your current setup, no matter what triggered the build: push to master or a new tag - the resulting image will change only if you published a new version to PyPI (This line:
pip install --no-cache-dir flask peewee sqlite-webis executed while the image is built and whatever arrived from pip at that moment is what we'll have in the resulting image). So no matter what you push to master, image taggedlatestwould always contain https://pypi.org/project/sqlite-web/0.6.4/ -
With this PR, we'll never see a new image at all since it utilizes cache and there is nothing that can change in this repository that will invalidate this cache since nothing is
ADDed orCOPYed inside the image
There are different possible solutions:
- Build images from the code; Also publish to PyPI from GitHub Actions so that Docker version matches PyPI version
- Only build fresh pushes to
masterin GitHub Actions and tag them asmaster, but also use code from the repo (otherwise we publish aslatestwhatever the last version published to PyPI) - If you publish to PyPI with some script, just build images locally and publish them from the same script
- etc
I don't know your workflow so I can't suggest what solution would work best for your needs
I've inspected the dockerfile, and it contains no dependencies on the contents of this repository
Oh, right -- yes, this was when the Dockerfile was intended as a standalone thing just to help people get up and running quickly. Probably want to modify the Dockerfile so it builds from the local code.