Update repository #1288
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |