Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): skip checkout when dockerfile lint has no work (#126704)

posthog[bot]a1f9156c532e
diff --git a/.github/workflows/container-images-ci.yml b/.github/workflows/container-images-ci.yml
index f41a56782f3b..7491e6a99793 100644
--- a/.github/workflows/container-images-ci.yml
+++ b/.github/workflows/container-images-ci.yml
@@ -249,11 +249,12 @@ jobs:
contents: read
steps:
- name: Check out
+ if: needs.changes.outputs.dockerfiles_changed == 'true'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Changed-Dockerfile list comes from the shared paths-filter in `changes`, so no
# second changed-files action or full-history checkout. The job still always runs
- # (only the hadolint step is gated) to keep its required-check status reporting.
+ # to keep its required-check status reporting.
- name: Lint changed Dockerfile(s) with Hadolint
if: needs.changes.outputs.dockerfiles_changed == 'true'
uses: jbergstroem/hadolint-gh-action@2b00b87f8a56783930b6a4749837d7c45c567ff2 # v1.13.0