-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.36 KB
/
Copy pathalgorithm-catalog-compact.yml
File metadata and controls
42 lines (36 loc) · 1.36 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
name: Algorithm Catalog — compact request files
# Mirrors dse-hub-compact.yml. Submissions arrive as uniquely-named files under
# algorithm-catalog/data/requests/ (that uniqueness is what makes two people submitting at the same
# time conflict-free). Once merged, this folds them into the canonical data and deletes the folded
# files, so data/requests/ stays small no matter how many activations get filed.
#
# [skip ci] on the commit stops this push from re-triggering the validate workflow.
on:
push:
branches: [main]
paths:
- "algorithm-catalog/data/requests/**"
workflow_dispatch:
jobs:
compact:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
- name: Apply requests and compact
run: node algorithm-catalog/scripts/compact.mjs
- name: Commit compacted canonicals (if changed)
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add algorithm-catalog/data/
if git diff --cached --quiet; then
echo "Nothing to commit."
else
git commit -m "chore: compact algorithm-catalog requests into canonical data [skip ci]"
git push
fi