-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.92 KB
/
Copy pathfetch-coderabbit-data.yml
File metadata and controls
57 lines (48 loc) · 1.92 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
name: Fetch CodeRabbit Data
on:
schedule:
# Target IST: 12:15 AM and 12:30 PM on weekdays (GitHub cron is UTC).
# 12:15 AM IST = 18:45 UTC prior calendar day → Mon–Fri 18:45 UTC ≈ Tue–Sat 00:15 IST.
# 12:30 PM IST = 07:00 UTC → Mon–Fri 07:00 UTC = Mon–Fri 12:30 IST.
# Staggered from osde2e workflow (*/6 hours) to reduce push conflicts.
- cron: '45 18 * * 1-5'
- cron: '0 7 * * 1-5'
workflow_dispatch: # Allow manual trigger
jobs:
fetch-data:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Fetch CodeRabbit OpenShift data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 scripts/fetch_coderabbit_Openshift_data.py
- name: Fetch CodeRabbit EEE data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 scripts/fetch_coderabbit_EEE_data.py
- name: Update historical manifest
run: |
python3 scripts/update_manifest.py
- name: Check for changes
id: git-check
run: |
git diff --exit-code data/coderabbit-openshift-status.json data/coderabbit-EEE-status.json data/historical-manifest.json || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push if changed
if: steps.git-check.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add data/coderabbit-openshift-status.json data/coderabbit-EEE-status.json data/historical-manifest.json
git commit -m "Update CodeRabbit adoption data [skip ci]"
git pull --rebase origin main
git push