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 : Deploy Rote Backend
2+
3+ on :
4+ push :
5+ branches :
6+ - develop
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Docker Buildx
17+ uses : docker/setup-buildx-action@v3
18+
19+ - name : Log in to Docker Hub
20+ uses : docker/login-action@v3
21+ with :
22+ username : ${{ secrets.DOCKERHUB_USERNAME }}
23+ password : ${{ secrets.DOCKERHUB_TOKEN }}
24+
25+ - name : Build and push Docker image
26+ uses : docker/build-push-action@v5
27+ with :
28+ context : ./backend
29+ file : ./backend/Dockerfile
30+ push : true
31+ tags : |
32+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:latest-dev
33+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:develop
34+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:develop-${{ github.sha }}
Original file line number Diff line number Diff line change 1+ name : Release Deploy Rote Backend
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ release :
8+ types : [published]
9+
10+ jobs :
11+ build-and-deploy :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v3
20+
21+ - name : Log in to Docker Hub
22+ uses : docker/login-action@v3
23+ with :
24+ username : ${{ secrets.DOCKERHUB_USERNAME }}
25+ password : ${{ secrets.DOCKERHUB_TOKEN }}
26+
27+ - name : Build and push Docker image
28+ uses : docker/build-push-action@v5
29+ with :
30+ context : ./backend
31+ file : ./backend/Dockerfile
32+ push : true
33+ tags : |
34+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:latest
35+ ${{ secrets.DOCKERHUB_USERNAME }}/rote-backend:${{ github.ref_type == 'tag' && github.ref_name || 'main' }}
You can’t perform that action at this time.
0 commit comments