From d474b4c509a602c8f1f2a38f3cc06b6429828ad2 Mon Sep 17 00:00:00 2001 From: Yurii Puchkov Date: Wed, 27 Dec 2023 17:51:45 -0700 Subject: [PATCH] fix: Docker lint & Dockerfile optimization --- .github/workflows/build.yaml | 5 ++--- Dockerfile | 8 +++----- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7ca7f0c..475be23 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 @@ -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: diff --git a/Dockerfile b/Dockerfile index 83e8932..c9b862a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 04e9b65..e4befdf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pygitver" -version = "0.1.0-dev" +version = "0.0.3-dev" authors = [ { name="Yurii Puchkov", email="panpuchkov@gmail.com" }, ]