-
Notifications
You must be signed in to change notification settings - Fork 71
85 lines (72 loc) · 2.8 KB
/
update-integrations.yml
File metadata and controls
85 lines (72 loc) · 2.8 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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: Setup pnpm
uses: pnpm/action-setup@v4.1.0
with:
version: 10.32.1
- name: Install main dependencies
run: pnpm install
- name: Install script dependencies
run: |
cd .github/scripts
npm install
- name: Update integration versions
id: check_versions
env:
BOTPRESS_TOKEN: ${{ secrets.BOTPRESS_TOKEN }}
BOTPRESS_WORKSPACE_ID: ${{ secrets.BOTPRESS_WORKSPACE_ID }}
run: |
node .github/scripts/updates/update-integration-versions.js
- name: Update integration Cards and Triggers
id: update_integrations
env:
BOTPRESS_TOKEN: ${{ secrets.BOTPRESS_TOKEN }}
BOTPRESS_WORKSPACE_ID: ${{ secrets.BOTPRESS_WORKSPACE_ID }}
run: |
node .github/scripts/updates/bulk-update.js
- name: Create Pull Request
if: steps.check_versions.outputs.has_updates == 'true' || steps.update_integrations.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 "Integration updates: ${{ steps.update_integrations.outputs.has_updates }}"
echo "Card updates: ${{ steps.update_integrations.outputs.has_card_updates }}"
echo "Trigger updates: ${{ steps.update_integrations.outputs.has_trigger_updates }}"
if [ "${{ steps.check_versions.outputs.has_updates }}" == "false" ] && [ "${{ steps.update_integrations.outputs.has_updates }}" == "false" ]; then
echo "No updates found"
fi