-
Notifications
You must be signed in to change notification settings - Fork 104
59 lines (47 loc) · 1.61 KB
/
sync-datadog-cli.yaml
File metadata and controls
59 lines (47 loc) · 1.61 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
name: Sync datadog-cli from cc-datadog
on:
schedule:
# Runs daily at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch: # Allows manual trigger from GitHub UI
permissions:
contents: write
jobs:
sync:
name: Sync datadog-cli skill
runs-on: ubuntu-latest
steps:
- name: Checkout agent-skills
uses: actions/checkout@v4
- name: Clone cc-datadog
run: |
git clone --depth 1 https://github.com/leonardocouy/cc-datadog.git /tmp/cc-datadog
- name: Sync skill directory
run: |
# Remove old directory if it exists
rm -rf skills/datadog-cli
# Copy new version
cp -r /tmp/cc-datadog/skills/datadog-cli skills/
# Copy README.md from root to skill directory
cp /tmp/cc-datadog/README.md skills/datadog-cli/
echo "✅ Copied datadog-cli from cc-datadog"
- name: Check for changes
id: check
run: |
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes detected"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "Changes detected:"
git status --short
fi
- name: Commit and push
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add skills/datadog-cli
git commit -m "chore: sync datadog-cli from cc-datadog [skip ci]"
git push
echo "✅ Pushed changes to agent-skills"