-
Notifications
You must be signed in to change notification settings - Fork 44
65 lines (57 loc) · 2.37 KB
/
Copy pathversion-sync.yml
File metadata and controls
65 lines (57 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Keep plugin.json and marketplace.json versions in sync with the release
# manifest. Runs on every push to the release branch that touches the
# manifest or any .claude-plugin file, reads the authoritative version,
# updates the target files, and commits back if anything changed.
#
# Commits made with GITHUB_TOKEN do not re-trigger workflows, so this
# cannot create an infinite loop.
name: Version Sync
on:
push:
branches:
- automation/skills-sync
paths:
- '.github/.release-manifest.json'
- '.claude-plugin/**'
- 'package.json'
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout release branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: automation/skills-sync
- name: Install uv
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
- name: Sync versions from manifest
id: sync
run: |
output=$(uv run --project scripts/ci-tools ci-tools release sync \
--manifest .github/.release-manifest.json \
--plugin-json plugins/elasticsearch/plugin.json \
--plugin-json plugins/elasticsearch/.claude-plugin/plugin.json \
--plugin-json plugins/cloud/plugin.json \
--plugin-json plugins/cloud/.claude-plugin/plugin.json \
--plugin-json plugins/kibana/plugin.json \
--plugin-json plugins/kibana/.claude-plugin/plugin.json \
--plugin-json plugins/observability/plugin.json \
--plugin-json plugins/observability/.claude-plugin/plugin.json \
--plugin-json plugins/security/plugin.json \
--plugin-json plugins/security/.claude-plugin/plugin.json \
--plugin-json package.json \
--marketplace-json .claude-plugin/marketplace.json \
--marketplace-json .github/plugin/marketplace.json)
echo "$output"
count=$(echo "$output" | jq '.updated | length')
echo "count=$count" >> "$GITHUB_OUTPUT"
- name: Commit and push
if: steps.sync.outputs.count != '0'
run: |
git config user.name "Elastic Machine"
git config user.email "elasticmachine@users.noreply.github.com"
git add -A
git commit -m "chore: sync versions from release manifest"
git push