File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ name : push
2+
3+ on : push
4+
5+ jobs :
6+ push :
7+ name : Push to Docker Hub
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Docker meta
11+ id : meta
12+ uses : docker/metadata-action@v3
13+ with :
14+ images : your-username/your-image-name
15+ tags : |
16+ type=ref,prefix=dev-,event=branch
17+ type=semver,pattern={{version}}
18+ type=semver,pattern={{major}}
19+ type=semver,pattern={{major}}.{{minor}}
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v1
22+ - name : Login to DockerHub
23+ uses : docker/login-action@v1
24+ with :
25+ username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ password : ${{ secrets.DOCKERHUB_TOKEN }}
27+ - name : Build and push
28+ id : docker_build
29+ uses : docker/build-push-action@v2
30+ with :
31+ push : true
32+ tags : ${{ steps.meta.outputs.tags }}
33+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments