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.

ci: optimize full-depth checkouts (#61766)

Catalin Irimief64459299512
diff --git a/.github/workflows/ci-agent-skills.yml b/.github/workflows/ci-agent-skills.yml
index 20c262502ca0..0f7f3832e902 100644
--- a/.github/workflows/ci-agent-skills.yml
+++ b/.github/workflows/ci-agent-skills.yml
@@ -162,8 +162,6 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- fetch-depth: 0
- name: Log in to Docker Hub
if: ${{ env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != '' }}
@@ -255,8 +253,8 @@ jobs:
- name: Determine next version
id: version
run: |
- git fetch --tags --force
- LATEST_TAG=$(git tag -l 'agent-skills-v*' | grep -E '^agent-skills-v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
+ REMOTE_TAGS=$(git ls-remote --tags --refs origin 'refs/tags/agent-skills-v*')
+ LATEST_TAG=$(printf '%s\n' "$REMOTE_TAGS" | awk '{print $2}' | sed 's#refs/tags/##' | grep -E '^agent-skills-v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
if [ -z "$LATEST_TAG" ]; then LATEST_TAG="agent-skills-v0.0.0"; fi
MINOR=$(echo "${LATEST_TAG#agent-skills-v}" | cut -d. -f2)
echo "tag=agent-skills-v0.$((MINOR + 1)).0" >> "$GITHUB_OUTPUT"
diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml
index 054b22245e3e..89cd019dd04b 100644
--- a/.github/workflows/ci-rust.yml
+++ b/.github/workflows/ci-rust.yml
@@ -84,6 +84,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
+ filter: blob:none
clean: false
- name: Install rust
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 14007d734446..9ace85cb70b6 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: master
- fetch-depth: 0
+ sparse-checkout: cli/.sampo/changesets
- name: Check for changesets
id: check
@@ -92,6 +92,7 @@ jobs:
with:
ref: master
fetch-depth: 0
+ filter: blob:none
token: ${{ steps.app-token.outputs.token }}
- name: Install Rust
diff --git a/.github/workflows/terragrunt-posthog.yaml b/.github/workflows/terragrunt-posthog.yaml
index 867b3323a340..cae5329515dc 100644
--- a/.github/workflows/terragrunt-posthog.yaml
+++ b/.github/workflows/terragrunt-posthog.yaml
@@ -31,7 +31,7 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
- fetch-depth: 0
+ sparse-checkout: terraform
- name: Find all terraform modules
id: changes