mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2026-07-11 16:33:58 -04:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Hadolint
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
hadolint:
|
|
name: Validate Dockerfile syntax
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
# Start Docker Buildx
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
|
|
|
# Checkout the repo
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
# End Checkout the repo
|
|
|
|
# Test Dockerfiles with hadolint
|
|
- name: Run hadolint on Dockerfile
|
|
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0
|
|
with:
|
|
dockerfile: Dockerfile
|
|
# End Test Dockerfiles with hadolint
|
|
|
|
# Test Dockerfiles with docker build checks
|
|
- name: Run docker build check
|
|
run: |
|
|
echo "Checking Dockerfile"
|
|
docker build --check . -f Dockerfile
|
|
# End Test Dockerfiles with docker build checks
|