mirror of
https://github.com/hadolint/hadolint-action.git
synced 2026-07-06 00:21:39 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a6d062e78 | |||
| 0b08ca228d | |||
| 9a555bc2d4 | |||
| e8cde77aa0 | |||
| bc86787e19 | |||
| d2b4ab26ff | |||
| 2bcb99c6e2 | |||
| 63666e594d | |||
| 96339c1113 | |||
| 37f399667b | |||
| aa70df94a2 |
@@ -76,13 +76,13 @@ jobs:
|
||||
dockerfile: testdata/warning.Dockerfile
|
||||
config: testdata/hadolint.yaml
|
||||
|
||||
- name: Run integration test 6 - output to file
|
||||
# This step will never fail, but will print out rule violations.
|
||||
uses: ./
|
||||
with:
|
||||
dockerfile: testdata/warning.Dockerfile
|
||||
format: sarif
|
||||
output-file: /report.sarif
|
||||
#- name: Run integration test 6 - output to file
|
||||
# # This step will never fail, but will print out rule violations.
|
||||
# uses: ./
|
||||
# with:
|
||||
# dockerfile: testdata/warning.Dockerfile
|
||||
# format: sarif
|
||||
# output-file: report.sarif
|
||||
|
||||
release:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM hadolint/hadolint:v2.9.2-debian
|
||||
FROM hadolint/hadolint:v2.9.3-debian
|
||||
|
||||
COPY LICENSE README.md problem-matcher.json /
|
||||
COPY hadolint.sh /usr/local/bin/hadolint.sh
|
||||
|
||||
@@ -50,7 +50,7 @@ steps:
|
||||
| | severity | |
|
||||
| ignore | Space separated list of Hadolint rules to | <none> |
|
||||
| | ignore. | |
|
||||
| trusted-resgitries | List of urls of trusted registries | |
|
||||
| trusted-registries | List of urls of trusted registries | |
|
||||
|
||||
## Hadolint Configuration
|
||||
|
||||
@@ -65,6 +65,7 @@ Contributions are what make the open source community such an amazing place to b
|
||||
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
||||
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
||||
5. Open a Pull Request
|
||||
|
||||
## 💛 Support the project
|
||||
|
||||
If this project was useful to you in some form, We would be glad to have your support. It will help keeping the project alive.
|
||||
|
||||
+9
-2
@@ -19,6 +19,10 @@ if [ -n "$HADOLINT_CONFIG" ]; then
|
||||
HADOLINT_CONFIG="-c ${HADOLINT_CONFIG}"
|
||||
fi
|
||||
|
||||
if [ -z "$HADOLINT_TRUSTED_REGISTRIES" ]; then
|
||||
unset HADOLINT_TRUSTED_REGISTRIES;
|
||||
fi
|
||||
|
||||
OUTPUT=
|
||||
if [ -n "$HADOLINT_OUTPUT" ]; then
|
||||
if [ -f "$HADOLINT_OUTPUT" ]; then
|
||||
@@ -27,16 +31,19 @@ if [ -n "$HADOLINT_OUTPUT" ]; then
|
||||
OUTPUT=" | tee $HADOLINT_OUTPUT"
|
||||
fi
|
||||
|
||||
FAILED=0
|
||||
if [ "$HADOLINT_RECURSIVE" = "true" ]; then
|
||||
shopt -s globstar
|
||||
|
||||
filename="${!#}"
|
||||
flags="${@:1:$#-1}"
|
||||
|
||||
hadolint $HADOLINT_CONFIG $flags **/$filename $OUTPUT
|
||||
hadolint $HADOLINT_CONFIG $flags **/$filename $OUTPUT || FAILED=1
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
hadolint $HADOLINT_CONFIG "$@" $OUTPUT
|
||||
hadolint $HADOLINT_CONFIG "$@" $OUTPUT || FAILED=1
|
||||
fi
|
||||
|
||||
[ -z "$HADOLINT_OUTPUT" ] || echo "Hadolint output saved to: $HADOLINT_OUTPUT"
|
||||
|
||||
exit $FAILED
|
||||
|
||||
Reference in New Issue
Block a user