Skip to content

Hadolint

Hadolint #938

Workflow file for this run

name: Hadolint
on:
schedule:
- cron: '0 15 * * *'
workflow_dispatch:
permissions:
actions: read
checks: write
contents: none
deployments: none
id-token: write
issues: none
packages: none
pull-requests: write
repository-projects: none
security-events: write
statuses: write
env:
NODE_VERSION: 18
jobs:
hadolint:
runs-on: ubuntu-latest
strategy:
matrix:
pattern: [
{ app: lambda/lambda-examples/lambda/container/hello-rust-lambda, image: lambda }
]
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PERSONAL_TOKEN_FOR_GITHUB_ACTIONS }}
- name: Build (debug) ${{ matrix.pattern.app }}
run: |
docker build --rm \
--build-arg NODE_VERSION=${{ env.NODE_VERSION }} \
--build-arg DIST=debian \
-t ${{ matrix.pattern.image }}:latest \
${{ matrix.pattern.app }}
- name: Build (release) ${{ matrix.pattern.app }}
run: |
docker build --rm \
--build-arg NODE_VERSION=${{ env.NODE_VERSION }} \
--build-arg DIST=debian \
--target=release \
-t ${{ matrix.pattern.image }}:release \
${{ matrix.pattern.app }}
- name: Hadolint ${{ matrix.pattern.app }}
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: ${{ matrix.pattern.app }}/Dockerfile