Skip to content

Commit

Permalink
fix: Docker lint & Dockerfile optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
panpuchkov committed Dec 28, 2023
1 parent 70933b6 commit d474b4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ jobs:
fetch-depth: 0

- name: Dockerfile lint
if: ${{ env.IMAGE_EXIST == 'false' }}
id: validate-dockerfile
shell: bash
run: |
docker run --rm -e HADOLINT_IGNORE=DL3007,DL3008,DL3018,DL4006,DL3013 -i hadolint/hadolint < Dockerfile
docker run --rm -e HADOLINT_IGNORE=DL3018,DL3013 -i hadolint/hadolint < Dockerfile
- name: Unit Tests
shell: bash
Expand All @@ -45,7 +44,7 @@ jobs:
build:
runs-on: ubuntu-latest
needs: unittests
if: github.ref == 'refs/heads/main'
#if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ WORKDIR /build-pkg
COPY . /build-pkg

RUN apk add --no-cache git \
&& pip install --no-cache-dir -U pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir -r requirements-build.txt \
&& pip install --no-cache-dir -U pip -r requirements-build.txt \
&& rm -rf dist \
&& python -m build \
&& pip install $(ls /build-pkg/dist/pygitver-*.tar.gz) \
&& pip uninstall -r requirements-build.txt -y
&& pip uninstall -r requirements-build.txt -y \
&& pip install --no-cache-dir "$(ls /build-pkg/dist/pygitver-*.tar.gz)"

################################################################
FROM python:3.12-alpine
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pygitver"
version = "0.1.0-dev"
version = "0.0.3-dev"
authors = [
{ name="Yurii Puchkov", email="[email protected]" },
]
Expand Down

0 comments on commit d474b4c

Please sign in to comment.