-
Notifications
You must be signed in to change notification settings - Fork 485
63 lines (55 loc) · 1.89 KB
/
publish-docker-image.yml
File metadata and controls
63 lines (55 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Publish docker image
on:
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build the LogonTracer Docker Image and start
run: |
docker image build ./docker -t jpcertcc/docker-logontracer:latest -t ghcr.io/jpcertcc/docker-logontracer:latest
docker container run --detach --publish=7474:7474 --publish=7687:7687 --publish=8080:8080 -e LTHOSTNAME=localhost jpcertcc/docker-logontracer
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cython
pip install numpy
pip install scipy
pip install statsmodels
pip install -r requirements.txt
- name: Test for LogonTracer web gui
run: curl --verbose --show-error http://localhost:8080
- name: Test for LogonTracer log import
run: python logontracer.py -e sample/Security.evtx
publish:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Register Docker Hub
uses: docker/build-push-action@v5
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: jpcertcc/docker-logontracer
dockerfile: docker/Dockerfile
tags: latest
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Register GitHub Container Registry
run: docker push ghcr.io/jpcertcc/docker-logontracer:latest