File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Server - Docker Build and Push
2
+
3
+ on :
4
+ push :
5
+ # Will be triggered when a new tag is created
6
+ # Tags have to follow semver format
7
+ tags :
8
+ - ' *.*.*'
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@f054a8b539a109f9f41c372932f1ae047eff08c9
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@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
27
+ with :
28
+ images : factly/hunting
29
+
30
+ - name : Build and push Docker image
31
+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
32
+ with :
33
+ context : .
34
+ file : Dockerfile
35
+ push : true
36
+ tags : ${{ steps.meta.outputs.tags }}
37
+ labels : ${{ steps.meta.outputs.labels }}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments