File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish docker image to docker hub
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build-and-push :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Log in to Docker Hub
17+ uses : docker/login-action@v2
18+ with :
19+ username : ${{ secrets.DOCKERHUB_USERNAME }}
20+ password : ${{ secrets.DOCKERHUB_TOKEN }}
21+
22+ - name : Build and push Docker image
23+ uses : docker/build-push-action@v5
24+ with :
25+ context : ./backend
26+ push : true
27+ tags : |
28+ ${{ secrets.DOCKERHUB_USERNAME }}/vidsh:latest
29+ ${{ secrets.DOCKERHUB_USERNAME }}/vidsh:${{ github.sha }}
30+ cache-from : type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/vidsh:latest
31+ cache-to : type=inline
You can’t perform that action at this time.
0 commit comments