-
Notifications
You must be signed in to change notification settings - Fork 166
54 lines (46 loc) · 1.77 KB
/
intercom-sdk-check.yml
File metadata and controls
54 lines (46 loc) · 1.77 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
name: Check Intercom SDK Updates
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
check-updates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Run SDK update script
id: sdk
run: dart scripts/check_intercom_sdk_updates.dart
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Determine PR title
id: pr
if: steps.sdk.outputs.updates_available == 'true'
run: |
if [[ "${{ steps.sdk.outputs.android_updated }}" == "true" && "${{ steps.sdk.outputs.ios_updated }}" == "true" ]]; then
echo "title=Update intercom-android ${{ steps.sdk.outputs.android_version }} and intercom-ios ${{ steps.sdk.outputs.ios_version }}" >> "$GITHUB_OUTPUT"
elif [[ "${{ steps.sdk.outputs.android_updated }}" == "true" ]]; then
echo "title=Update intercom-android ${{ steps.sdk.outputs.android_version }}" >> "$GITHUB_OUTPUT"
else
echo "title=Update intercom-ios ${{ steps.sdk.outputs.ios_version }}" >> "$GITHUB_OUTPUT"
fi
- name: Create pull request
if: steps.sdk.outputs.updates_available == 'true'
uses: peter-evans/create-pull-request@v6
with:
commit-message: ${{ steps.pr.outputs.title }}
title: ${{ steps.pr.outputs.title }}
body: |
Automated Intercom SDK update.
- Updates Android and iOS Intercom SDK versions where applicable.
- Refreshes README and CHANGELOG entries.
branch: automation/intercom-sdk-update
labels: automation