Commit Graph

11 Commits

Author SHA1 Message Date
evazion
29b3b83c9a github: update github actions versions. 2022-11-01 15:37:58 -05:00
evazion
2d74bc60db github: temp disable ARM build. 2022-11-01 14:53:14 -05:00
evazion
e220b66c4d Revert "github: temp disable ARM build."
This reverts commit 6a4a4da1bc.
2022-10-06 23:16:27 -05:00
evazion
6a4a4da1bc github: temp disable ARM build. 2022-10-05 01:58:11 -05:00
evazion
2b387bdc41 docker: add Docker image for ARM.
* Have CI build Docker images for both x86 and ARM.
* Add a `bin/rails danbooru:docker:build-arm` command for building a Docker image locally for ARM.

Usage:

* Test the image:

  docker run --rm -it --platform linux/arm64 ghcr.io/danbooru/danbooru bash

* Build the image:

  bin/rails danbooru:docker:build-arm

* Build the image by hand:

  git archive HEAD | docker buildx build - --platform linux/amd64 --build-arg SOURCE_COMMIT=$(git rev-parse HEAD) -t danbooru -f Dockerfile --load
2022-04-24 21:42:51 -05:00
evazion
cc9d7b8349 Revert "ci: prevent running multiple Docker builds at once."
This reverts commit 9d62f71cd9.

This caused a problem where if you pushed multiple branches or tags at
once, for example to the betabooru and production branches, then the
Docker image would only get built for one branch. This led to deploys
not fetching the latest image.
2021-09-29 08:13:39 -05:00
evazion
9d62f71cd9 ci: prevent running multiple Docker builds at once. 2021-09-24 08:40:33 -05:00
evazion
96c5c346ad ci: allow triggering docker build workflow manually.
Add a `workflow_dispatch` so that it's possible it's possible to trigger
the Docker build workflow manually.

https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
2021-09-18 21:34:28 -05:00
evazion
020ed7b735 ci: don't tag short commit hash on Docker images.
Tagging both the long and the short commit hash on images creates too
much clutter in the Github UI.
2021-09-18 05:14:36 -05:00
evazion
52cf13dff1 ci: limit workflow permissions.
Make it so pull requests from outside contributors can't edit workflows
under .github/workflows/ without approval. Also limit workflows to the
minimum permissions necessary.
2021-09-18 04:37:00 -05:00
evazion
39fa2fe02d ci: split docker build workflow from test workflow.
Split up the Github workflow. Instead of one workflow with two jobs, one
to build the Docker image and one to test it, split it into two separate
workflows, one to build and one to test. This way if the Docker build
fails it doesn't try to run the tests, and if the tests fail it only
marks the test workflow as failed, not the entire workflow.

This is especially so the workflows page doesn't show everything as
failing just because the tests failed.

https://github.com/danbooru/danbooru/actions
2021-09-18 01:34:07 -05:00