Fetch Repos #11
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: Fetch Repos | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 */7 * *' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
fetch-repos: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v3.5.3 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: "3.10.10" | |
- name: Install dependencies | |
run: | | |
conda install git-lfs -c conda-forge | |
git-lfs install | |
conda install gh -c conda-forge | |
- name: Install Python Dependencies | |
run: | | |
pip install requests | |
- name: Execute Fetch Script | |
run: | | |
python src/fetch_repos.py | |
- name: Commit and Push Changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "files/repo_info.json" | |
message: "Update repo_info.json via GitHub Actions" | |
push: true |