-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.35 KB
/
update-data.yml
File metadata and controls
52 lines (42 loc) · 1.35 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
name: Update Dashboard Data
on:
schedule:
- cron: "0 6 * * *" # Daily at 6am UTC
workflow_dispatch:
permissions: {}
concurrency:
group: update-data
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
permissions:
# Push update to repo
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
- name: Set up Python
run: uv python install 3.14
- name: Restore bare repo cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/openneuro-dashboard/repos
key: git-repos-${{ github.run_id }}
restore-keys: git-repos-
- name: Run pipeline
run: uv run openneuro-dashboard run-all
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add data/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: Update dashboard data $(date -u +%Y-%m-%d)"
git push
fi