Skip to content

Fetch GitHub MetaData #62

Fetch GitHub MetaData

Fetch GitHub MetaData #62

Workflow file for this run

name: Fetch GitHub MetaData
on:
schedule:
# Runs at 00:00 UTC every day
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
fetch-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: '21' # Adjust to the appropriate Node.js version
- name: Install Dependencies
run: |
npm install cheerio lodash
- name: Fetch GitHub Repos
env:
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
run: |
node ./action/fetch-data.js
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add ghmeta.json
git commit -m 'github meta updated'
git push