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+ # This deploys every new commit of the website to https://preview.voidmodding.org/
2+ name : Docker Release (Preview)
3+
4+ on :
5+ workflow_dispatch :
6+ push :
7+ branches :
8+ - " dev"
9+
10+ permissions :
11+ contents : read
12+ packages : write
13+
14+ jobs :
15+ build-and-push :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Log in to GitHub Container Registry
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ - name : Docker metadata
33+ id : meta
34+ uses : docker/metadata-action@v5
35+ with :
36+ images : |
37+ ghcr.io/${{ github.repository_owner }}/web
38+ tags : |
39+ type=raw,value=preview
40+ labels : |
41+ org.opencontainers.image.source=${{ github.repository }}
42+ org.opencontainers.image.revision=${{ github.sha }}
43+ org.opencontainers.image.version=preview
44+
45+ - name : Build and push
46+ uses : docker/build-push-action@v6
47+ with :
48+ context : ./
49+ file : ./Dockerfile
50+ push : true
51+ tags : ${{ steps.meta.outputs.tags }}
52+ labels : ${{ steps.meta.outputs.labels }}
53+
54+ - name : Summary
55+ run : |
56+ echo "Published image tag: preview"
Original file line number Diff line number Diff line change @@ -15,9 +15,11 @@ services:
1515 - " --providers.docker=true"
1616 - " --providers.docker.exposedbydefault=false"
1717 - " --entrypoints.web.address=:80"
18+ - " --entrypoints.web-preview.address=:81"
19+
1820 ports :
1921 - " 80:80"
20- - " 443:443 "
22+ - " 81:81 "
2123 volumes :
2224 - /var/run/docker.sock:/var/run/docker.sock:ro
2325
@@ -30,3 +32,13 @@ services:
3032 - " traefik.http.routers.web.rule=Host(`voidmodding.org`)"
3133 deploy :
3234 replicas : 3
35+
36+ preview :
37+ image : ghcr.io/void-modding/web:preview
38+ restart : always
39+ labels :
40+ - " com.centurylinklabs.watchtower.enable=true"
41+ - " traefik.enable=true"
42+ - " traefik.http.routers.web-preview.rule=Host(`preview.voidmodding.org`)"
43+ deploy :
44+ replicas : 1
You can’t perform that action at this time.
0 commit comments