File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 11
11
- ' **/*.py'
12
12
- ' **/*.ini'
13
13
- ' **/*.toml'
14
+ - ' Dockerfile'
14
15
push :
15
16
branches :
16
17
- master
21
22
- ' **/*.py'
22
23
- ' **/*.ini'
23
24
- ' **/*.toml'
25
+ - ' Dockerfile'
24
26
25
27
jobs :
26
28
tox-lint :
27
- # Linting is ran through tox to ensure that the same linter is used by local runners
28
29
runs-on : ubuntu-latest
30
+ # Linting is ran through tox to ensure that the same linter
31
+ # is used by local runners
29
32
steps :
30
33
- uses : actions/checkout@v4
31
34
- name : Set up linting environment
41
44
tox-matrix :
42
45
runs-on : ${{ matrix.os }}
43
46
strategy :
44
- fail-fast : false # We want to know what specicic versions it fails on
47
+ # We want to know what specicic versions it fails on
48
+ fail-fast : false
45
49
matrix :
46
50
os : [
47
51
ubuntu-latest,
67
71
pip install tox-gh-actions
68
72
- name : Run tox
69
73
run : tox
74
+ docker-build-test :
75
+ runs-on : ubuntu-latest
76
+ steps :
77
+ - name : Checkout code
78
+ uses : actions/checkout@v4
79
+ - name : Set up Docker Buildx
80
+ uses : docker/setup-buildx-action@v3
81
+ - name : Get version from pyproject.toml
82
+ id : get-version
83
+ run : |
84
+ VERSION=$(grep -m1 'version = ' pyproject.toml | cut -d'"' -f2)
85
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
86
+ - name : Build Docker image
87
+ run : |
88
+ docker build \
89
+ --build-arg VERSION_TAG=${{ steps.get-version.outputs.version }} \
90
+ -t sherlock-test:latest .
91
+ - name : Test Docker image runs
92
+ run : docker run --rm sherlock-test:latest --version
Original file line number Diff line number Diff line change 4
4
# 3. Build image with BOTH latest and version tags
5
5
# i.e. `docker build -t sherlock/sherlock:0.16.0 -t sherlock/sherlock:latest .`
6
6
7
- FROM python:3.12-slim-bullseye as build
7
+ FROM python:3.12-slim-bullseye AS build
8
8
WORKDIR /sherlock
9
9
10
10
RUN pip3 install --no-cache-dir --upgrade pip
You can’t perform that action at this time.
0 commit comments