1- name : Release Deploy Rote Backend
1+ name : Release Deploy Rote ( Backend & Frontend)
22
33on :
44 push :
88 types : [published]
99
1010jobs :
11- build-and-deploy :
11+ build-backend :
1212 runs-on : ubuntu-latest
1313
1414 steps :
@@ -17,19 +17,53 @@ jobs:
1717
1818 - name : Set up Docker Buildx
1919 uses : docker/setup-buildx-action@v3
20+ with :
21+ platforms : linux/amd64,linux/arm64
22+
23+ - name : Log in to Docker Hub
24+ uses : docker/login-action@v3
25+ with :
26+ username : ${{ secrets.DOCKERHUB_USERNAME }}
27+ password : ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+ - name : Build and push backend Docker image
30+ uses : docker/build-push-action@v5
31+ with :
32+ context : ./server
33+ file : ./server/Dockerfile
34+ platforms : linux/amd64,linux/arm64
35+ push : true
36+ tags : |
37+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:latest
38+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:release
39+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:${{ github.event.release.tag_name || github.ref_name || 'main' }}
40+
41+ build-frontend :
42+ runs-on : ubuntu-latest
43+
44+ steps :
45+ - name : Checkout code
46+ uses : actions/checkout@v4
47+
48+ - name : Set up Docker Buildx
49+ uses : docker/setup-buildx-action@v3
50+ with :
51+ platforms : linux/amd64,linux/arm64
2052
2153 - name : Log in to Docker Hub
2254 uses : docker/login-action@v3
2355 with :
2456 username : ${{ secrets.DOCKERHUB_USERNAME }}
2557 password : ${{ secrets.DOCKERHUB_TOKEN }}
2658
27- - name : Build and push Docker image
59+ - name : Build and push frontend Docker image
2860 uses : docker/build-push-action@v5
2961 with :
3062 context : ./web
3163 file : ./web/Dockerfile
64+ platforms : linux/amd64,linux/arm64
3265 push : true
3366 tags : |
34- ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:latest
35- ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:${{ github.ref_type == 'tag' && github.ref_name || 'main' }}
67+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-frontend:latest
68+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-frontend:release
69+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-frontend:${{ github.event.release.tag_name || github.ref_name || 'main' }}
0 commit comments