-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1.01 KB
/
update.yml
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: Update repository
on:
schedule:
- cron: '0 6 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '^3.10'
- name: Set up environment
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Almighty"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install -r requirements.txt
- name: Run script
run: python -m find_datalad_repos -l DEBUG --github --osf
env:
GITHUB_TOKEN: ${{ secrets.SEARCH_GITHUB_TOKEN }}
- name: Push changes
run: |
ahead="$(git rev-list --count --right-only @{upstream}...HEAD)"
if [ "$ahead" -gt 0 ]
then git push
else echo "No commits to push"
fi
# vim:set et sts=2: