Sync datadog-cli from cc-datadog #124
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |