Skip to content

Commit 982c97f

Browse files
committed
renamed pre-commit file & added workflow to create docker file
1 parent c1e4f46 commit 982c97f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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.

0 commit comments

Comments
 (0)