mirror of
https://github.com/hadolint/hadolint-action.git
synced 2026-05-15 14:45:53 +00:00
Fix of ShellCheck and doc update. Int testing updates. Added ShellCheck action.
This commit is contained in:
parent
88c79a349b
commit
dbfcf14efc
3 changed files with 53 additions and 20 deletions
39
.github/workflows/ci.yml
vendored
39
.github/workflows/ci.yml
vendored
|
|
@ -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/action-shellcheck@v1.16.0
|
||||
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 6 - output to file
|
||||
- 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 8 - output to file
|
||||
# # This step will never fail, but will print out rule violations.
|
||||
# uses: ./
|
||||
# with:
|
||||
|
|
@ -94,6 +122,7 @@ jobs:
|
|||
name: Release
|
||||
runs-on: ubuntu-20.04
|
||||
needs: integration-tests
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: cycjimmy/semantic-release-action@v3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue