Register template repos #44
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: Register template repos | |
on: | |
schedule: | |
# Twice a month: https://crontab.guru/#0_5_1,15_*_* | |
- cron: "0 5 1,15 * *" | |
workflow_dispatch: | |
jobs: | |
register-template-repos: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.BOT_GH_TOKEN }} | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
cache-dependency-path: "**/pyproject.toml" | |
- name: Install build dependencies | |
run: python -m pip install --upgrade pip wheel | |
- name: Install package with scripts | |
run: pip install ./scripts | |
- name: Update template repo registry | |
run: register-template-repos template-repos.yml | |
env: | |
GITHUB_TOKEN: "${{ secrets.BOT_GH_TOKEN }}" | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: ./template-repos.yml | |
author_name: scverse-bot | |
author_email: [email protected] | |
message: "Updated template-repos.yml" | |
push: true | |
- name: Show diff | |
run: git diff HEAD~1 |