File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Push API Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build-and-push :
10+ runs-on : ubuntu-latest
11+ if : github.ref == 'refs/heads/main'
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Docker Buildx
18+ uses : docker/setup-buildx-action@v3
19+
20+ - name : Login to Docker Hub
21+ uses : docker/login-action@v3
22+ with :
23+ username : ${{ secrets.DOCKERHUB_USERNAME }}
24+ password : ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+ - name : Build and push Docker image
27+ uses : docker/build-push-action@v5
28+ with :
29+ context : .
30+ file : docker/Dockerfile
31+ push : true
32+ tags : |
33+ andrenormanlang/mindsmesh-api:latest
34+ andrenormanlang/mindsmesh-api:${{ github.sha }}
You can’t perform that action at this time.
0 commit comments