-
Notifications
You must be signed in to change notification settings - Fork 6
Automatic Builds
Github Actions provides continuous integration, which automatically tests your code whenever you make a commit. If tests pass, your ChRIS plugin will be automatically uploaded to two places: DockerHub and the ChRIS Store.
DockerHub is a repository for container images. This is where the executables of your app live.
The ChRIS Store https://chrisstore.co is a second service which describes ChRIS plugins that live in DockerHub.
The developer’s workflow looks like:
-
Write code.
-
git push
-
Create a Github release.
A chain of automatic steps execute on every push (and release) which builds and publishes your software. Additionally, pull requests will be automatically built and tested but they will not be published until they are merged.
Each time you push to Github, container images should be rebuilt and pushed to Dockerhub.
-
platform support should include x86_64, PowerPC, and ARM
-
master
branch will be built as:latest
-
tags and releases will be built as
:<tag>
During cookiecutter creation, answer "yes" (1
) to publish_from_github_actions
?
Tip
|
The cookiecutter-chrisapp outputs Github Actions configuration to .github/workflows/ci.yml
|
Your Github repository settings should define the following secrets. For help, see https://docs.github.com/en/actions/reference/encrypted-secrets
Tip
|
use organization level secrets. If your repository lives under https://github.com/FNNDSC, there is nothing you need to do. |
Name | Value |
---|---|
|
DockerHub username, e.g. "fnndscbot" |
|
DockerHub password |
|
https://chrisstore.co login in the form of |
Multi-arch docker image builds is experimental and has many known problems. You can change the automatic build configuration in .github/workflows/ci.yml
to disable targeting of non-x86_64 platforms.
@@ -100,7 +100,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v2
id: docker_build
with:
context: .
file: ./Dockerfile
tags: |
${{ steps.determine.outputs.dock_image }}
localhost:5000/${{ steps.determine.outputs.dock_image }}
- platforms: linux/amd64,linux/ppc64le,linux/arm64
+ platforms: linux/amd64
push: true
We choose Github Actions over competing platforms, e.g. DockerHub autobuilds and Travis CI.
The convenience of single-platform is unrivaled. Moreover, true CI is more flexible than Dockerhub autobuilds, allowing buildx to be used for multi-platform images.