Skip to content

Commit

Permalink
fix(gha): improve megalinter by enabling more linters
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap committed Jan 27, 2024
1 parent bc9ccc5 commit 20843a6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/check-broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Check - container
# Unpinned Actions Full Length Commit SHA
# kics-scan ignore-line
uses: ./
with:
url: https://rust-lang.github.io/mdBook/
Expand Down Expand Up @@ -73,6 +75,7 @@ jobs:
run: ./entrypoint.sh

- name: Check links using container
# kics-scan ignore-line
uses: ./
with:
url: https://my-testing-domain.com
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/markdown-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ on:
- "**.md"
- .github/workflows/markdown-check.yml
- .markdownlint.yml
- .spelling
push:
branches:
- main
paths:
- "**.md"
- .github/workflows/markdown-check.yml
- .markdownlint.yml
- .spelling

permissions: read-all

Expand All @@ -29,24 +27,9 @@ jobs:
uses: ruzickap/action-my-markdown-linter@919d3735df9bbc094d206521a774133ec8f3c4ca # v1.1.0
with:
exclude: |
tests/
CHANGELOG.md
markdown-spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install Node.js 12
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 12.x

- name: Install markdown-spellcheck
run: npm install -g markdown-spellcheck

- name: Run mdspell
run: find . -type f \( -name "*.md" ! -name "CHANGELOG.md" \) -print0 | xargs -0 --max-args=1 --verbose mdspell --ignore-numbers --ignore-acronyms --report --en-gb

markdown-link-check:
runs-on: ubuntu-latest
steps:
Expand All @@ -56,4 +39,5 @@ jobs:
uses: ruzickap/action-my-markdown-link-checker@e7e8635735a15a86b081f8255022bcc251cc9003 # v1.2.0
with:
exclude: |
tests/
CHANGELOG.md
6 changes: 3 additions & 3 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ BASH_SHFMT_ARGUMENTS: --indent 2 --space-redirects

DISABLE_LINTERS:
- MARKDOWN_MARKDOWN_LINK_CHECK # Using lychee instead
- REPOSITORY_DEVSKIM
- REPOSITORY_KICS
- REPOSITORY_TRIVY
# - REPOSITORY_DEVSKIM
# - REPOSITORY_KICS
# - REPOSITORY_TRIVY
- SPELL_CSPELL

# Remove: To receive reports as email, please set variable EMAIL_REPORTER_EMAIL
Expand Down
18 changes: 0 additions & 18 deletions .spelling

This file was deleted.

5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
# - https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/engine/hack/make.sh#L149
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
# kics-scan ignore-block
RUN set -eux && \
test -e /etc/nsswitch.conf || echo 'hosts: files dns' > /etc/nsswitch.conf && \
apk add --no-cache bash ca-certificates wget && \
Expand All @@ -38,4 +39,8 @@ RUN set -eux && \

COPY entrypoint.sh /entrypoint.sh

USER nobody

HEALTHCHECK NONE

ENTRYPOINT [ "/entrypoint.sh" ]

0 comments on commit 20843a6

Please sign in to comment.