-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.46 KB
/
Copy pathcatalog-sync.yml
File metadata and controls
49 lines (42 loc) · 1.46 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
name: Catalog sync
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
inputs:
force:
description: Re-extract even if command-code version is unchanged
type: boolean
default: false
permissions:
contents: write
issues: write
pull-requests: write
jobs:
sync:
name: catalog-pr
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
token: ${{ secrets.RELEASE_SYNC_TOKEN || secrets.CATALOG_PUSH_TOKEN || secrets.GITHUB_TOKEN }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.14"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Ensure automation labels
env:
GH_TOKEN: ${{ secrets.RELEASE_SYNC_TOKEN || secrets.CATALOG_PUSH_TOKEN || secrets.GITHUB_TOKEN }}
run: |
gh label create catalog-break --force --color B60205 \
--description "Catalog model extraction failed in CI" || true
gh label create automation --force --color 0E8A16 \
--description "Automated bot activity" || true
- name: Open catalog PR
env:
CI: "true"
FORCE: ${{ inputs.force }}
GH_TOKEN: ${{ secrets.RELEASE_SYNC_TOKEN || secrets.CATALOG_PUSH_TOKEN || secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_SYNC_TOKEN || secrets.CATALOG_PUSH_TOKEN || secrets.GITHUB_TOKEN }}
run: bun run scripts/catalog-sync-ci.ts