Files
todo-baggins/.github/workflows/hadolint-check.yaml
Matouš Volf e23e4de534
Some checks failed
actionlint check / actionlint check (pull_request) Failing after 3s
GitLeaks check / GitLeaks check (pull_request) Failing after 38s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 41s
dotenv-linter check / dotenv-linter check (pull_request) Failing after 39s
hadolint check / hadolint check (pull_request) Failing after 37s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 53s
htmlhint check / htmlhint check (pull_request) Successful in 56s
markdownlint check / markdownlint check (pull_request) Successful in 54s
Prettier check / Prettier check (pull_request) Successful in 30s
Rust check / Rust check (pull_request) Has been cancelled
Stylelint check / Stylelint check (pull_request) Successful in 35s
ShellCheck check / ShellCheck check (pull_request) Successful in 40s
yamllint check / yamllint check (pull_request) Successful in 46s
checkov check / checkov check (pull_request) Successful in 6m50s
ci: support x86 in the checks
2026-02-09 22:57:19 +01:00

55 lines
1.5 KiB
YAML

---
name: hadolint check
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, edited, reopened, synchronize]
permissions: {}
jobs:
build:
name: hadolint check
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: read
packages: read
statuses: write
steps:
- name: hadolint installation
working-directory: /bin
run: |
set -e
VERSION="2.12.0"
ARCH="$(uname -m)"
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "amd64" ]; then
ASSET="hadolint-Linux-x86_64"
CHECKSUM="56de6d5e5ec427e17b74fa48d51271c7fc0d61244bf5c90e828aab8362d55010 hadolint"
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
ASSET="hadolint-Linux-arm64"
CHECKSUM="5798551bf19f33951881f15eb238f90aef023f11e7ec7e9f4c37961cb87c5df6 hadolint"
else
echo "Unsupported architecture: $ARCH" > &2
exit 1
fi
wget -O hadolint "https://github.com/hadolint/hadolint/releases/download/v${VERSION}/${ASSET}"
echo "$CHECKSUM" | sha256sum --check
chmod +x hadolint
- name: code checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
- name: hadolint check
run: |
STATUS=0
while read -r file; do
echo "Linting $file..."
hadolint "$file" || STATUS=1
done < <(find . -name "Dockerfile")
exit $STATUS