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 : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+
9+ jobs :
10+ build-and-push :
11+ name : Build and Push Docker Image
12+ runs-on : ubuntu-latest
13+ environment : Dockerhub
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
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 : Extract metadata (tags, labels) for Docker
26+ id : meta
27+ uses : docker/metadata-action@v5
28+ with :
29+ images : ${{ secrets.DOCKERHUB_USERNAME }}/minimediametadataapi
30+ tags : |
31+ type=ref,event=branch
32+ type=sha
33+
34+ - name : Build and push Docker image
35+ uses : docker/build-push-action@v5
36+ with :
37+ context : .
38+ file : MiniMediaMetadataAPI/Dockerfile
39+ push : true
40+ tags : ${{ steps.meta.outputs.tags }}
41+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments