forked from hadolint/hadolint-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hadolint#74 from ViacheslavKudinov/master
Fix of ShellCheck. Doc update. Int testing updates. Added ShellCheck job.
- Loading branch information
Showing
3 changed files
with
61 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ on: | |
env: | ||
TEST_IMAGE_NAME: hadolint-action:${{github.sha}} | ||
|
||
permissions: | ||
contents: write | ||
issues: write # Used by Release step to update "The automated release is failing" issue | ||
pull-requests: write # Used by ShellCheck Action to add comments on PR | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
|
@@ -18,10 +23,21 @@ jobs: | |
- name: Run hadolint | ||
run: hadolint Dockerfile | ||
|
||
shellcheck: | ||
name: ShellCheck | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run ShellCheck | ||
uses: reviewdog/[email protected] | ||
with: | ||
reporter: github-pr-review | ||
fail_on_error: true | ||
|
||
build-test: | ||
name: Build and Test | ||
runs-on: ubuntu-20.04 | ||
needs: ["lint"] | ||
needs: [ "lint", "shellcheck" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build Docker image | ||
|
@@ -69,8 +85,9 @@ jobs: | |
failure-threshold: error | ||
format: json | ||
|
||
- name: Run integration test 5 - output format | ||
# This step will never fail, but will print out rule violations. | ||
- name: Run integration test 5 - config file | ||
# This step will never fail, but will print out rule violations | ||
# because in config is set the error failure threshold. | ||
id: hadolint5 | ||
uses: ./ | ||
with: | ||
|
@@ -79,9 +96,20 @@ jobs: | |
|
||
- name: Run integration test 6 - verify results output parameter | ||
# This step will never fail, but will print out the results from step5 | ||
run: echo "${{ steps.hadolint5.outputs.results }}" | ||
env: | ||
results: ${{ steps.hadolint5.outputs.results }} | ||
run: echo "$results" | ||
|
||
- name: Run integration test 7 - set recursive | ||
# This step will never fail, but will print out rule violations | ||
# for all the Dockerfiles in repository. | ||
uses: ./ | ||
with: | ||
dockerfile: "*Dockerfile" | ||
failure-threshold: error | ||
recursive: true | ||
|
||
#- name: Run integration test 6 - output to file | ||
#- name: Run integration test 8 - output to file | ||
# # This step will never fail, but will print out rule violations. | ||
# uses: ./ | ||
# with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters