Skip to content

Commit 8f001c8

Browse files
feliwirclaude
andcommitted
ci: publish fork images to Docker Hub (mbitsimaging/dicom-rst)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 9085261 commit 8f001c8

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Publishes the mbits-imaging fork to Docker Hub (https://hub.docker.com/r/mbitsimaging/dicom-rst).
2+
# Requires the DOCKERHUB_USERNAME and DOCKERHUB_TOKEN repository secrets.
3+
name: Publish Docker image to Docker Hub
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: ["main"]
8+
tags: ["v*.*.*"]
9+
env:
10+
IMAGE_NAME: mbitsimaging/dicom-rst
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
strategy:
17+
matrix:
18+
include:
19+
- dockerfile: Dockerfile
20+
suffix: ""
21+
- dockerfile: Dockerfile-s3
22+
suffix: "-s3"
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Log in to Docker Hub
27+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
- name: Extract metadata (tags, labels) for Docker
32+
id: meta
33+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
34+
with:
35+
images: ${{ env.IMAGE_NAME }}
36+
tags: |
37+
type=semver,pattern={{version}}
38+
type=ref,event=branch
39+
type=sha
40+
flavor: |
41+
latest=auto
42+
suffix=${{ matrix.suffix }},onlatest=true
43+
- name: Build and push Docker image
44+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
45+
with:
46+
context: .
47+
file: ${{ matrix.dockerfile }}
48+
push: true
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)