-
Notifications
You must be signed in to change notification settings - Fork 47
46 lines (38 loc) · 1.46 KB
/
copy_probe_features.yml
File metadata and controls
46 lines (38 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
name: Sync neuropixels_probe_features from ProbeTable
on:
schedule:
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC
workflow_dispatch:
jobs:
copy-file:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Copy file from external repo
run: |
# Download the file directly
curl -o src/probeinterface/resources/neuropixels_probe_features.json \
https://raw.githubusercontent.com/billkarsh/ProbeTable/refs/heads/main/Tables/probe_features.json
- name: Commit changes if any
id: commit
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add src/probeinterface/resources/neuropixels_probe_features.json
# Only commit if there are changes
if git diff --staged --quiet; then
echo "No changes to commit"
echo "changes=false" >> $GITHUB_OUTPUT
else
git commit -m "Update neuropixels_probe_features from ProbeTable"
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Make PR with updated probe features
if: steps.commit.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v7
with:
title: "Update Neuropixels probe features"
body: "This PR updates the probe features JSON file from the ProbeTable repository."
branch-suffix: short-commit-hash
base: "main"