Skip to content

Commit

Permalink
Add docker file linting
Browse files Browse the repository at this point in the history
  • Loading branch information
CSR2017 committed Jul 26, 2023
1 parent b0827f8 commit a3a51ed
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/on-pullrequest-dockerfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: On Pull Request - Dockerfile

on:
push:
branches:
- main
paths:
- ".github/workflows/on-pullrequest-dockerfile.yml"
- "Docker/*"
pull_request:
branches:
- main
paths:
- ".github/workflows/on-pullrequest-dockerfile.yml"
- "Docker/*"
workflow_dispatch:

jobs:
docker-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
name: Run Linter on Dockerfiles
with:
dockerfile: "Docker/api-mssql.Dockerfile Docker/api-pgsql.Dockerfile Docker/dbadmin.Dockerfile Docker/dev.Dockerfile"

# - uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
# name: Run Linter on NPM Dockerfile
# with:
# dockerfile: docker/Dockerfile

# - name: Build the NPM Docker image
# # To confirm no errors occur. The "local" one will be built by the e2e
# # testing process.
# run: docker build --build-arg ML_VERSION=pre .
# working-directory: docker
2 changes: 2 additions & 0 deletions Docker/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ RUN apk --no-cache add curl=~8 dos2unix=~7 bash=~5 gettext=~0 icu=~72 gcompat &&
EXPOSE 443
WORKDIR /app

# dummy change for testing lint

ENTRYPOINT ["/app/run.sh"]

0 comments on commit a3a51ed

Please sign in to comment.