Update Integrations #5
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: Update Integrations | |
| on: | |
| schedule: | |
| - cron: '0 9 * * 1' | |
| workflow_dispatch: | |
| jobs: | |
| update-integrations: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@v2 | |
| id: generate-token | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '22' | |
| - name: Install main dependencies | |
| run: npm install | |
| - name: Install script dependencies | |
| run: | | |
| cd .github/scripts | |
| npm install | |
| - name: Check for version updates | |
| id: check_versions | |
| env: | |
| BOTPRESS_TOKEN: ${{ secrets.BOTPRESS_TOKEN }} | |
| BOTPRESS_WORKSPACE_ID: ${{ secrets.BOTPRESS_WORKSPACE_ID }} | |
| run: | | |
| node .github/scripts/check-version-updates.js | |
| - name: Update integration Cards | |
| id: update_cards | |
| env: | |
| BOTPRESS_TOKEN: ${{ secrets.BOTPRESS_TOKEN }} | |
| BOTPRESS_WORKSPACE_ID: ${{ secrets.BOTPRESS_WORKSPACE_ID }} | |
| run: | | |
| node .github/scripts/get-action-data.js | |
| - name: Create Pull Request | |
| if: steps.check_versions.outputs.has_updates == 'true' || steps.update_cards.outputs.has_updates == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| commit-message: 'chore: update integration docs' | |
| title: 'chore: update integration docs' | |
| body: | | |
| Weekly integrations update based on the latest data from the Botpress Admin API. | |
| (This PR was automatically created using a workflow) | |
| branch: update-integrations | |
| delete-branch: true | |
| base: master | |
| labels: | | |
| automated | |
| - name: Output results | |
| run: | | |
| echo "Integration update process completed" | |
| echo "Version updates: ${{ steps.check_versions.outputs.has_updates }}" | |
| echo "Card updates: ${{ steps.update_cards.outputs.has_updates }}" | |
| if [ "${{ steps.check_versions.outputs.has_updates }}" == "false" ] && [ "${{ steps.update_cards.outputs.has_updates }}" == "false" ]; then | |
| echo "No updates found" | |
| fi |