Skip to content

Commit

Permalink
Add GHA for hadolint (omec-project#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
gab-arrobo authored Mar 21, 2024
1 parent 044fe55 commit a41edcc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ jobs:
version: latest
args: -v --config ./.golangci.yml

hadolint:
name: hadolint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Dockerfile linter
uses: hadolint/[email protected]
# For now, ignoring:
# DL3007 warning: Pin the version explicitily to a release tag (no latest);
# DL3008 warning: Pin versions in apt get install (e.g., apt-get install <package>=<version>); and
# DL3018 warning: Pin versions in apk add (e.g., apk add <package>=<version>)
with:
dockerfile: Dockerfile
ignore: DL3007,DL3008,DL3018

check-spelling:
name: Markdown spellcheck
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ RUN ./install_ntf.sh
RUN PLUGINS=$(find "$PLUGINS_DIR" -mindepth 1 -maxdepth 1 -type d) && \
CMD="./build.py bess" && \
for PLUGIN in $PLUGINS; do \
CMD="$CMD --plugin $PLUGIN"; \
CMD="$CMD --plugin \"$PLUGIN\""; \
done && \
eval $CMD && \
eval "$CMD" && \
cp bin/bessd /bin && \
mkdir -p /bin/modules && \
cp core/modules/*.so /bin/modules && \
Expand All @@ -54,6 +54,7 @@ RUN PLUGINS=$(find "$PLUGINS_DIR" -mindepth 1 -maxdepth 1 -type d) && \

# Stage bess: creates the runtime image of BESS
FROM ubuntu:22.04 AS bess
WORKDIR /
COPY requirements.txt .
RUN apt-get update && apt-get install -y \
--no-install-recommends \
Expand Down

0 comments on commit a41edcc

Please sign in to comment.