File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-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+ tags :
6+ - v*
7+ release :
8+ type : [published]
9+
10+ jobs :
11+ push_to_registry :
12+ name : Push Docker image to Docker Hub
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Check out the repo
16+ uses : actions/checkout@v2
17+
18+ - name : Log in to Docker Hub
19+ uses : docker/login-action@v1
20+ with :
21+ username : ${{ secrets.DOCKER_USERNAME }}
22+ password : ${{ secrets.DOCKER_PASSWORD }}
23+
24+ - name : Extract metadata (tags, labels) for Docker
25+ id : meta
26+ uses : docker/metadata-action@v3
27+ with :
28+ images : ${{ secrets.DOCKER_HUB_REPO }}
29+
30+ - name : Build and push Docker image
31+ uses : docker/build-push-action@v2
32+ with :
33+ context : .
34+ push : true
35+ tags : ${{ steps.meta.outputs.tags }}
36+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments