Skip to content

Using NB_PROJECT_PAT #15

Using NB_PROJECT_PAT

Using NB_PROJECT_PAT #15

Workflow file for this run

name: Fetch Repositories
on:
push:
branches:
- feat-80
# schedule:
# Run every week
# - cron: '0 0 * * 0' # Runs every Sunday at midnight UTC
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
fetch-repos:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up jq
run: sudo apt-get install jq
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.NB_BOT_ID }}
private-key: ${{ secrets.NB_BOT_KEY }}
- name: Run fetch-repos.sh
env:
TOKEN: ${{ steps.generate-token.outputs.token }}
working-directory: scripts
run: |
chmod +x fetch-repos.sh
./fetch-repos.sh
- name: Commit changes
run: |
git config user.name "Neurobagel Bot"
git config user.email "actions@github.com"
git add ./src/assets/repos.json
git commit -m "Updated repos.json with latest repository names"
git push
env:
GITHUB_TOKEN: ${{ secrets.NB_PROJECT_PAT }}