Skip to content

Commit

Permalink
Merge pull request #73 from manuel-sommer/implement_hadolint
Browse files Browse the repository at this point in the history
🎉 improve Dockerfile and implement hadolint
  • Loading branch information
rndmh3ro authored Jul 30, 2024
2 parents bb6e312 + 359148a commit 857e3a3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Hadolint
on: pull_request

jobs:
hadolint:
runs-on: ubuntu-latest
name: Hadolint-your-PR
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
# Pass what names/filters you want to catch
files: |
**/Dockerfile.*
separator: " "
# Only run if expected files are changed and pass these as input
- uses: jbergstroem/hadolint-gh-action@v1
if: steps.changed-files.outputs.any_changed == 'true'
with:
dockerfile: "${{ steps.changed-files.outputs.other_changed_files }}"
1 change: 1 addition & 0 deletions .hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignored:
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ FROM python:3.12@sha256:b40b4e5c86136e5400e9347459a9366315ff129e07175fdde8e22114

WORKDIR /app

RUN pip install --no-cache-dir poetry
RUN pip install --no-cache-dir poetry==1.8.3

COPY poetry.lock pyproject.toml /app/

RUN poetry config virtualenvs.in-project true
RUN poetry install --no-ansi
RUN poetry config virtualenvs.in-project true && \
poetry install --no-ansi

FROM python:3.12-slim@sha256:740d94a19218c8dd584b92f804b1158f85b0d241e5215ea26ed2dcade2b9d138

Expand Down

0 comments on commit 857e3a3

Please sign in to comment.