extension_ci: Add infrastructure for this repository (#51493)

This will allow us to also use the workflows for this repository, which
will especially come in handy once we revisit provider extensions.

Not perfect, as we will trigger some failed workflows for extensions
that were just added

Release Notes:

- N/A
This commit is contained in:
Finn Evers authored and GitHub committed 2026-03-13 18:17:29 +01:00
1 parent 4e8937b62d
commit ccb2674a77
12 files changed
+358 -47

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
# Generated from xtask::workflows::extension_auto_bump
# Rebuild with `cargo xtask workflows`.
name: extension_auto_bump
on:
push:
branches:
- main
paths:
- extensions/**
- '!extensions/workflows/**'
- '!extensions/*.md'
jobs:
detect_changed_extensions:
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
clean: false
fetch-depth: 2
- id: detect
name: extension_auto_bump::detect_changed_extensions
run: |
COMPARE_REV="$(git rev-parse HEAD~1)"
CHANGED_FILES="$(git diff --name-only "$COMPARE_REV" "$GITHUB_SHA")"
# Detect changed extension directories (excluding extensions/workflows)
CHANGED_EXTENSIONS=$(echo "$CHANGED_FILES" | grep -oP '^extensions/[^/]+(?=/)' | sort -u | grep -v '^extensions/workflows$' || true)
if [ -n "$CHANGED_EXTENSIONS" ]; then
EXTENSIONS_JSON=$(echo "$CHANGED_EXTENSIONS" | jq -R -s -c 'split("\n") | map(select(length > 0))')
else
EXTENSIONS_JSON="[]"
fi
# Filter out newly added or entirely removed extensions
FILTERED="[]"
for ext in $(echo "$EXTENSIONS_JSON" | jq -r '.[]'); do
if git show HEAD~1:"$ext/extension.toml" >/dev/null 2>&1 && \
[ -f "$ext/extension.toml" ]; then
FILTERED=$(echo "$FILTERED" | jq --arg e "$ext" '. + [$e]')
fi
done
echo "changed_extensions=$FILTERED" >> "$GITHUB_OUTPUT"
outputs:
changed_extensions: ${{ steps.detect.outputs.changed_extensions }}
timeout-minutes: 5
bump_extension_versions:
needs:
- detect_changed_extensions
if: needs.detect_changed_extensions.outputs.changed_extensions != '[]'
permissions:
actions: write
contents: write
issues: write
pull-requests: write
strategy:
matrix:
extension: ${{ fromJson(needs.detect_changed_extensions.outputs.changed_extensions) }}
fail-fast: false
max-parallel: 1
uses: ./.github/workflows/extension_bump.yml
secrets:
app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
app-secret: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
with:
working-directory: ${{ matrix.extension }}
force-bump: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
defaults:
run:
shell: bash -euxo pipefail {0}
+1 -1
View File
@@ -214,7 +214,7 @@ jobs:
shell: bash -euxo pipefail {0}
working-directory: ${{ inputs.working-directory }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}extension-bump
cancel-in-progress: true
defaults:
run:
+1 -5
View File
@@ -216,12 +216,8 @@ jobs:
RESULT_ORCHESTRATE: ${{ needs.orchestrate.result }}
RESULT_CHECK_RUST: ${{ needs.check_rust.result }}
RESULT_CHECK_EXTENSION: ${{ needs.check_extension.result }}
defaults:
run:
shell: bash -euxo pipefail {0}
working-directory: ${{ inputs.working-directory }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}extension-tests
cancel-in-progress: true
defaults:
run:
+27 -1
View File
@@ -103,13 +103,22 @@ jobs:
check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qP
check_pattern "run_docs" '^(docs/|crates/.*\.rs)' -qP
check_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qP
check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests)))' -qvP
check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests))|extensions/)' -qvP
# Detect changed extension directories (excluding extensions/workflows)
CHANGED_EXTENSIONS=$(echo "$CHANGED_FILES" | grep -oP '^extensions/[^/]+(?=/)' | sort -u | grep -v '^extensions/workflows$' || true)
if [ -n "$CHANGED_EXTENSIONS" ]; then
EXTENSIONS_JSON=$(echo "$CHANGED_EXTENSIONS" | jq -R -s -c 'split("\n") | map(select(length > 0))')
else
EXTENSIONS_JSON="[]"
fi
echo "changed_extensions=$EXTENSIONS_JSON" >> "$GITHUB_OUTPUT"
outputs:
changed_packages: ${{ steps.filter.outputs.changed_packages }}
run_action_checks: ${{ steps.filter.outputs.run_action_checks }}
run_docs: ${{ steps.filter.outputs.run_docs }}
run_licenses: ${{ steps.filter.outputs.run_licenses }}
run_tests: ${{ steps.filter.outputs.run_tests }}
changed_extensions: ${{ steps.filter.outputs.changed_extensions }}
check_style:
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
runs-on: namespace-profile-4x8-ubuntu-2204
@@ -711,6 +720,20 @@ jobs:
- name: run_tests::check_postgres_and_protobuf_migrations::check_protobuf_formatting
run: buf format --diff --exit-code crates/proto/proto
timeout-minutes: 60
extension_tests:
needs:
- orchestrate
if: needs.orchestrate.outputs.changed_extensions != '[]'
permissions:
contents: read
strategy:
matrix:
extension: ${{ fromJson(needs.orchestrate.outputs.changed_extensions) }}
fail-fast: false
max-parallel: 1
uses: ./.github/workflows/extension_tests.yml
with:
working-directory: ${{ matrix.extension }}
tests_pass:
needs:
- orchestrate
@@ -728,6 +751,7 @@ jobs:
- check_docs
- check_licenses
- check_scripts
- extension_tests
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && always()
runs-on: namespace-profile-2x4-ubuntu-2404
steps:
@@ -756,6 +780,7 @@ jobs:
check_result "check_docs" "$RESULT_CHECK_DOCS"
check_result "check_licenses" "$RESULT_CHECK_LICENSES"
check_result "check_scripts" "$RESULT_CHECK_SCRIPTS"
check_result "extension_tests" "$RESULT_EXTENSION_TESTS"
exit $EXIT_CODE
env:
@@ -774,6 +799,7 @@ jobs:
RESULT_CHECK_DOCS: ${{ needs.check_docs.result }}
RESULT_CHECK_LICENSES: ${{ needs.check_licenses.result }}
RESULT_CHECK_SCRIPTS: ${{ needs.check_scripts.result }}
RESULT_EXTENSION_TESTS: ${{ needs.extension_tests.result }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true