Repository navigation
65 lines (56 loc) · 2.18 KB
/
Copy pathcloudkit-sync-dev.yml
File metadata and controls
65 lines (56 loc) · 2.18 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
# Development CloudKit Sync Workflow
#
# Automatically syncs macOS restore images, Xcode versions, and Swift versions to
# CloudKit development environment. Runs 3x daily on schedule, after binary builds,
# and supports manual triggers for testing.
#
# **Trigger Strategy**:
# - Scheduled: 3x daily at randomized minutes (avoids GitHub "thundering herd")
# - Automatic: After swoopmist binary build succeeds (testing integration)
# - Manual: workflow_dispatch for on-demand testing
#
# **Concurrency**: cancel-in-progress (newer syncs supersede older ones)
#
# **Export**: Enabled to verify sync results and track signing status changes
#
# For implementation details, see ./.github/actions/cloudkit-sync/action.yml
name: Scheduled CloudKit Sync (Development)
on:
# Scheduled sync: 3x daily at randomized minutes
# Why randomized minutes (17, 43, 29)?
# - Avoids predictable traffic patterns
# - Reduces GitHub Actions "thundering herd" at :00 minutes
# - Aligns with VirtualBuddy TSS cache lifetime (12h)
schedule:
- cron: '17 2 * * *' # 02:17 UTC
- cron: '43 10 * * *' # 10:43 UTC
- cron: '29 18 * * *' # 18:29 UTC
# Manual trigger for testing
workflow_dispatch:
# Why cancel-in-progress for dev environment?
# - Syncs are idempotent (safe to retry)
# - Newer data supersedes older data
# - Saves CI minutes by canceling outdated syncs
# - Multiple triggers may fire close together (build + schedule)
concurrency:
group: cloudkit-sync-dev
cancel-in-progress: true
jobs:
sync-dev:
name: Sync to CloudKit (Development)
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read # Read repository code
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: CloudKit Sync
uses: ./.github/actions/cloudkit-sync
with:
environment: development
container-id: iCloud.com.brightdigit.Swoop
cloudkit-key-id: ${{ secrets.CLOUDKIT_KEY_ID }}
cloudkit-private-key: ${{ secrets.CLOUDKIT_PRIVATE_KEY }}
virtualbuddy-api-key: ${{ secrets.VIRTUALBUDDY_API_KEY }}
enable-export: 'false' # Optional: export is only for data audit, summary comes from sync