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 and Publish Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' v*'
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v2
17+
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v1
20+
21+ - name : Log in to GitHub Container Registry
22+ uses : docker/login-action@v2
23+ with :
24+ registry : ghcr.io
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Build Docker image
29+ run : |
30+ docker build -t ghcr.io/${{ github.repository_owner }}/rpcimageserver:${{ github.sha }} .
31+
32+ - name : Push Docker image
33+ run : |
34+ docker push ghcr.io/${{ github.repository_owner }}/rpcimageserver:${{ github.sha }}
35+
36+ - name : Tag Docker image with version
37+ if : startsWith(github.ref, 'refs/tags')
38+ run : |
39+ docker tag ghcr.io/${{ github.repository_owner }}/rpcimageserver:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/rpcimageserver:${{ github.ref_name }}
40+ docker push ghcr.io/${{ github.repository_owner }}/rpcimageserver:${{ github.ref_name }}
41+
42+ - name : Tag Docker image as latest
43+ run : |
44+ docker tag ghcr.io/${{ github.repository_owner }}/rpcimageserver:${{ github.sha }} ghcr.io/${{ github.repository_owner }}/rpcimageserver:latest
45+ docker push ghcr.io/${{ github.repository_owner }}/rpcimageserver:latest
Original file line number Diff line number Diff line change 11services :
2+ watchtower :
3+ image : containrrr/watchtower
4+ command :
5+ - " --label-enable"
6+ - " --interval"
7+ - " 30"
8+ - " --rolling-restart"
9+ volumes :
10+ - /var/run/docker.sock:/var/run/docker.sock
11+
212 tunnel :
313 image : cloudflare/cloudflared:latest
414 restart : unless-stopped
@@ -11,9 +21,11 @@ services:
1121 - webnet
1222
1323 rpcavatar :
14- build : .
24+ image : ghcr.io/firstdarkdev/rpcimageserver:latest
1525 container_name : " rpcavatar"
1626 restart : unless-stopped
27+ labels :
28+ - " com.centurylinklabs.watchtower.enable=true"
1729 env_file :
1830 - .env
1931 ports :
@@ -44,9 +56,8 @@ services:
4456 minio :
4557 image : minio/minio:latest
4658 container_name : minio
47- environment :
48- - MINIO_ROOT_USER=minioadmin
49- - MINIO_ROOT_PASSWORD=minioadmin
59+ env_file :
60+ - .env
5061 ports :
5162 - " 9001:9001"
5263 volumes :
You can’t perform that action at this time.
0 commit comments