File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build & Publish to Docker Hub
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*" # Trigger on version tags: v0.1.0, v1.0.0, etc.
7+
8+ jobs :
9+ build-and-push :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Log in to Docker Hub
17+ uses : docker/login-action@v3
18+ with :
19+ username : ${{ secrets.DOCKERHUB_USERNAME }}
20+ password : ${{ secrets.DOCKERHUB_TOKEN }}
21+
22+ - name : Extract version tag
23+ id : meta
24+ uses : docker/metadata-action@v5
25+ with :
26+ images : ${{ secrets.DOCKERHUB_USERNAME }}/shadow-svn
27+ tags : |
28+ type=semver,pattern={{version}}
29+ type=raw,value=latest
30+
31+ - name : Build and push image
32+ uses : docker/build-push-action@v5
33+ with :
34+ context : ./app
35+ push : true
36+ tags : ${{ steps.meta.outputs.tags }}
37+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ services:
2121 - shadow-sync-net
2222
2323 sync-engine :
24- build :
24+ # Option A - Pull from Docker Hub (recommended for end users):
25+ # image: cihadkocasahan/shadow-svn:latest
26+ # Option B - Build from source (default, for development):
27+ build :
2528 context : ./app
2629 dockerfile : Dockerfile
2730 container_name : Shadow-Sync-Engine
You can’t perform that action at this time.
0 commit comments