ACP Registry Sync #15
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: ACP Registry Sync | |
| on: | |
| schedule: | |
| # Run daily at 4:00 AM UTC | |
| - cron: '0 4 * * *' | |
| workflow_dispatch: | |
| # Allow manual triggering | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Run ACP sync script | |
| id: sync | |
| run: | | |
| set +e | |
| node scripts/sync-acp.js | |
| EXIT_CODE=$? | |
| set -e | |
| echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT | |
| if [ $EXIT_CODE -eq 0 ]; then | |
| echo "No changes needed" | |
| echo "changes=false" >> $GITHUB_OUTPUT | |
| elif [ $EXIT_CODE -eq 1 ]; then | |
| echo "Changes detected" | |
| echo "changes=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "Error occurred (exit code: $EXIT_CODE)" | |
| exit $EXIT_CODE | |
| fi | |
| - name: Create Pull Request | |
| if: steps.sync.outputs.changes == 'true' | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: sync ACP services list' | |
| title: 'chore: sync ACP services list' | |
| body: | | |
| ## ACP Registry Sync | |
| This PR was automatically generated by the ACP Registry Sync workflow. | |
| ### Changes | |
| New service keys have been added to `api-keys.json` from the ACP registry. | |
| The sync script fetches the latest service definitions from the ACP registry | |
| and adds any new keys that are not already present in the local file. | |
| Existing keys and their values are preserved. | |
| ### Review | |
| Please review the new keys and add appropriate values if needed. | |
| branch: chore/acp-sync | |
| delete-branch: true |