Skip to content

Commit 3e32502

Browse files
blehnenclaude
andcommitted
ci: auto-publish dashboard docker image on v* tag (closes #122)
Adds a docker-publish job to publish.yml that runs after the NuGet publish succeeds on a v<version> tag push. Builds from the existing docker/dashboard/Dockerfile and pushes: blehnen74/dotnetworkqueue-dashboard:<version> blehnen74/dotnetworkqueue-dashboard:latest Dry-run semantics match the NuGet publish job -- the docker job is skipped entirely when workflow_dispatch is invoked with dry_run=true, so operational dry-runs exercise verify-gate + build-pack without either NuGet or docker side effects. Single-platform (linux/amd64) for now; issue #122 lists multi-arch as an optional follow-up. DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets must be configured in repo settings before first run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent afcc474 commit 3e32502

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,48 @@ jobs:
196196
echo "- NuGet feed: https://api.nuget.org/v3/index.json"
197197
echo "- Release URL: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
198198
} >> "$GITHUB_STEP_SUMMARY"
199+
200+
docker-publish:
201+
name: Build and push dashboard Docker image
202+
needs: publish
203+
# Same dry-run semantics as the NuGet publish job: skipped entirely when
204+
# workflow_dispatch is invoked with dry_run=true.
205+
if: ${{ github.event_name == 'push' || inputs.dry_run == false }}
206+
runs-on: ubuntu-latest
207+
steps:
208+
- name: Checkout
209+
uses: actions/checkout@v4
210+
211+
- name: Resolve version from tag
212+
id: ver
213+
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
214+
215+
- name: Set up Docker Buildx
216+
uses: docker/setup-buildx-action@v3
217+
218+
- name: Log in to Docker Hub
219+
uses: docker/login-action@v3
220+
with:
221+
username: ${{ secrets.DOCKERHUB_USERNAME }}
222+
password: ${{ secrets.DOCKERHUB_TOKEN }}
223+
224+
- name: Build and push image
225+
uses: docker/build-push-action@v6
226+
with:
227+
context: .
228+
file: docker/dashboard/Dockerfile
229+
platforms: linux/amd64
230+
push: true
231+
tags: |
232+
blehnen74/dotnetworkqueue-dashboard:${{ steps.ver.outputs.version }}
233+
blehnen74/dotnetworkqueue-dashboard:latest
234+
235+
- name: Job summary
236+
run: |
237+
{
238+
echo "## Docker publish summary"
239+
echo ""
240+
echo "- Image: blehnen74/dotnetworkqueue-dashboard"
241+
echo "- Tags pushed: ${{ steps.ver.outputs.version }}, latest"
242+
echo "- Platforms: linux/amd64"
243+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)