Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Hadolint

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
- name: Update Pull Request
uses: actions/github-script@v6
# if: github.event_name == 'pull_request'
with:
script: |
const output = `
#### Hadolint: \`${{ steps.hadolint.outcome }}\`
\`\`\`
${process.env.HADOLINT_RESULTS}
\`\`\`
`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
9 changes: 9 additions & 0 deletions .hadolint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Hadolint configuration file

# configure ignore rules
# see https://github.com/hadolint/hadolint#rules for a list of available rules.
ignored:
- DL3018
- DL3042
- DL3013
- DL3059 # multi run
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ LABEL "com.github.actions.description"="Run pylint and other commands"
LABEL "com.github.actions.icon"="upload-cloud"
LABEL "com.github.actions.color"="green"

RUN apk add --no-cache bash build-base gcc
RUN pip install --upgrade pip
RUN pip install pylint pipenv
RUN python --version ; pip --version ; pylint --version
RUN apk add --no-cache bash build-base gcc && \
pip install --upgrade pip && \
pip install pylint pipenv && \
python --version ; pip --version ; pylint --version

COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
Expand Down