-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.4 KB
/
Copy pathrefresh-zoho-data.yml
File metadata and controls
47 lines (41 loc) · 1.4 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
name: Refresh Zoho Backstage data
on:
workflow_dispatch:
inputs:
reason:
description: "Why are you refreshing? (shows up in commit message)"
required: false
default: "manual refresh"
permissions:
contents: write
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Fetch from Zoho Backstage
env:
ZOHO_CLIENT_ID: ${{ secrets.ZOHO_CLIENT_ID }}
ZOHO_CLIENT_SECRET: ${{ secrets.ZOHO_CLIENT_SECRET }}
ZOHO_REFRESH_TOKEN: ${{ secrets.ZOHO_REFRESH_TOKEN }}
ZOHO_PORTAL_ID: ${{ vars.ZOHO_PORTAL_ID }}
ZOHO_EVENT_ID: ${{ vars.ZOHO_EVENT_ID }}
ZOHO_API_DOMAIN: ${{ vars.ZOHO_API_DOMAIN }}
ZOHO_ACCOUNTS_DOMAIN: ${{ vars.ZOHO_ACCOUNTS_DOMAIN }}
run: node scripts/fetch-zoho.mjs
- name: Commit changes (if any)
run: |
git config user.name "techbash-bot"
git config user.email "bot@techbash.com"
git add skills/techbash/data/sponsors.json skills/techbash/data/tickets.json
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
git commit -m "chore(data): refresh Zoho snapshot (${{ inputs.reason }})"
git push