Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): update examples #140

Merged
merged 1 commit into from
Feb 2, 2024
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
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ jobs:
run: curl -Ls -o shfmt "https://github.com/mvdan/sh/releases/download/v${{ env.version }}/shfmt_v${{ env.version }}_linux_amd64" && chmod +x shfmt && sudo mv shfmt /usr/local/bin
- name: Lint shell scripts
run: shfmt -i 2 -d hadolint.sh install.sh lib/*.sh test/*.sh
typos:
name: Typos
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/[email protected]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
name: Hadolint
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jbergstroem/hadolint-gh-action@v1
```
Expand Down
20 changes: 10 additions & 10 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ on: pull_request
jobs:
hadolint:
runs-on: ubuntu-22.04
name: "Hadolint"
name: Hadolint
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: jbergstroem/hadolint-gh-action@v1
with:
# ignore warnings (but still fail on errors) from hadolint
Expand Down Expand Up @@ -51,9 +51,9 @@ on:
jobs:
hadolint:
runs-on: ubuntu-22.04
name: "Hadolint"
name: Hadolint
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: jbergstroem/hadolint-gh-action@v1
```

Expand All @@ -79,15 +79,15 @@ on: pull_request
jobs:
hadolint:
runs-on: ubuntu-22.04
name: "Hadolint"
name: Hadolint"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: jbergstroem/hadolint-gh-action@v1
with:
dockerfile: "Dockerfile path/to/my/other/Dockerfile"
```

### Only pass Dockerfiles that are changes in the PR
### Only pass Dockerfiles that are changed in the PR

In certain use-cases – for instance when you have a monorepo with a lot of Dockerfiles; you may
only want to pass the files that are changed in the PR. This would make processing faster.
Expand All @@ -102,12 +102,12 @@ on: pull_request
jobs:
hadolint:
runs-on: ubuntu-22.04
name: "Hadolint"
name: Hadolint
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v9.3
uses: tj-actions/changed-files@v42
with:
# Pass what names/filters you want to catch
files: |
Expand Down
2 changes: 1 addition & 1 deletion lib/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OUTPUT_FORMAT=${output_format:-}
HADOLINT_PATH=${hadolint_path:-"hadolint"}
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
CI=${GITHUB_ACTIONS:-"false"}
# This variable is magic in workflows; it intercepts output and makes it availble across jobs
# This variable is magic in workflows; it intercepts output and makes it available across jobs
GITHUB_OUTPUT=${GITHUB_OUTPUT:-/dev/null}
MATCHER_PREFIX=${GITHUB_ACTION_PATH:-"."}

Expand Down