aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/hadolint.yml
diff options
context:
space:
mode:
authorMathijs van Veluw <[email protected]>2024-08-13 12:52:07 +0200
committerGitHub <[email protected]>2024-08-13 12:52:07 +0200
commit9eebbf3b9f6ad6002353014148057049976be3d1 (patch)
tree36e2d980040096212268d14fc4f8c3fe424d042c /.github/workflows/hadolint.yml
parentb557c117247b0def307623b22203bd09c89bf05f (diff)
downloadvaultwarden-9eebbf3b9f6ad6002353014148057049976be3d1.tar.gz
vaultwarden-9eebbf3b9f6ad6002353014148057049976be3d1.zip
Update GitHub Action Workflows (#4849)
Diffstat (limited to '.github/workflows/hadolint.yml')
-rw-r--r--.github/workflows/hadolint.yml28
1 files changed, 25 insertions, 3 deletions
diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml
index bd890580..0da935a6 100644
--- a/.github/workflows/hadolint.yml
+++ b/.github/workflows/hadolint.yml
@@ -8,7 +8,7 @@ on: [
jobs:
hadolint:
name: Validate Dockerfile syntax
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
# Checkout the repo
@@ -16,6 +16,18 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# End Checkout the repo
+ # Start Docker Buildx
+ - name: Setup Docker Buildx
+ uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
+ # https://github.com/moby/buildkit/issues/3969
+ # Also set max parallelism to 2, the default of 4 breaks GitHub Actions and causes OOMKills
+ with:
+ buildkitd-config-inline: |
+ [worker.oci]
+ max-parallelism = 2
+ driver-opts: |
+ network=host
+
# Download hadolint - https://github.com/hadolint/hadolint/releases
- name: Download hadolint
shell: bash
@@ -26,8 +38,18 @@ jobs:
HADOLINT_VERSION: 2.12.0
# End Download hadolint
- # Test Dockerfiles
+ # Test Dockerfiles with hadolint
- name: Run hadolint
shell: bash
run: hadolint docker/Dockerfile.{debian,alpine}
- # End Test Dockerfiles
+ # End Test Dockerfiles with hadolint
+
+ # Test Dockerfiles with docker build checks
+ - name: Run docker build check
+ shell: bash
+ run: |
+ echo "Checking docker/Dockerfile.debian"
+ docker build --check . -f docker/Dockerfile.debian
+ echo "Checking docker/Dockerfile.alpine"
+ docker build --check . -f docker/Dockerfile.alpine
+ # End Test Dockerfiles with docker build checks