Repository navigation
Add workflow to publish the Docker image on releases - #193
AARUSHGAUR wants to merge 6 commits into
Conversation
s2t2
left a comment
There was a problem hiding this comment.
thanks @AARUSHGAUR for this contribution. I have some minor comments
| The [Setup Guide](docs/setup.md) provides all the information you need to run | ||
| the code locally. | ||
|
|
||
| ## Docker |
There was a problem hiding this comment.
could we please move this content into docs/setup/docker.
We can re-organize that file to have two top level sections: build from docker registry (implemented in this PR), and build yourself locally (current content)
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: ${{ github.repository }} | ||
| DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} |
There was a problem hiding this comment.
Let's please add some instructions in the docs related to this workflow, or comments at the top of this file, to instruct administrators about what repo secrets and env vars are required by this workflow, and how an admin could set them up, including links to how to docker registry, as applicable.
|
Thanks @s2t2, I've addressed both review comments. Docker documentation
Publish workflow
Verification
CI
|
Fixes #192.
Adds a release-triggered workflow that publishes the Docker image so the notebooks and scripts can be used without building locally.
What it does:
release: published, and also onworkflow_dispatch(with an optionaltaginput) so the publish path can be exercised manually.ghcr.io/google/sbsim, tagged with the release version (1.2.3,1.2) andlatest. GHCR uses the workflow's built-inGITHUB_TOKEN, so this path works as soon as the workflow is merged, with no new repository secrets.<username>/sbsimwhen theDOCKER_HUB_USERNAMEandDOCKER_HUB_PASSWORDrepository secrets are set, as described in the issue. That step is skipped when the secrets are absent, so the workflow stays green until the secrets are configured.type=ghacache layout as the existing Docker Build workflow.docker pull ghcr.io/google/sbsim:latest).Testing:
actionlint .github/workflows/docker-publish.yamlpasses.workflow_dispatchto verify the push end to end. If you would rather keep this GHCR-only, I am happy to drop the Docker Hub steps.