File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 - ' **/*.py'
1212 - ' **/*.ini'
1313 - ' **/*.toml'
14+ - ' Dockerfile'
1415 push :
1516 branches :
1617 - master
2122 - ' **/*.py'
2223 - ' **/*.ini'
2324 - ' **/*.toml'
25+ - ' Dockerfile'
2426
2527jobs :
2628 tox-lint :
27- # Linting is ran through tox to ensure that the same linter is used by local runners
2829 runs-on : ubuntu-latest
30+ # Linting is ran through tox to ensure that the same linter
31+ # is used by local runners
2932 steps :
3033 - uses : actions/checkout@v4
3134 - name : Set up linting environment
4144 tox-matrix :
4245 runs-on : ${{ matrix.os }}
4346 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
4549 matrix :
4650 os : [
4751 ubuntu-latest,
6771 pip install tox-gh-actions
6872 - name : Run tox
6973 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 44 # 3. Build image with BOTH latest and version tags
55 # i.e. `docker build -t sherlock/sherlock:0.16.0 -t sherlock/sherlock:latest .`
66
7- FROM python:3.12-slim-bullseye as build
7+ FROM python:3.12-slim-bullseye AS build
88WORKDIR /sherlock
99
1010RUN pip3 install --no-cache-dir --upgrade pip
You can’t perform that action at this time.
0 commit comments