Skip to content

Scrape Github Orgs #609

Scrape Github Orgs

Scrape Github Orgs #609

Workflow file for this run

name: Scrape Github Orgs
on:
schedule:
- cron: '10 02 * * *'
jobs:
scrape:
name: Run repo scrape
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run scrape
env:
GITHUB_AUTH_TOKEN: ${{ secrets.REDHAT_PERFBOT_SCRAPE_TOKEN }}
run: |
cd scraper
go mod download
go run main.go
- name: Store repositories.json file
uses: actions/upload-artifact@v3
with:
name: repos
path: public/repositories.json
update:
name: Update gh-pages
runs-on: ubuntu-latest
needs: scrape
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Delete existing repositories.json file
run: rm -f ./repositories.json
- name: Download repositories.json file
uses: actions/download-artifact@v3
with:
name: repos
path: ./
- name: Update and push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_EMAIL: [email protected]
GH_USERNAME: redhat-perfbot
run: |
git config --global user.name $GH_USERNAME
git config --global user.email $GH_EMAIL
git remote set-url origin https://$GH_USERNAME:[email protected]/redhat-performance/tooling-curator.git
git add repositories.json
git diff-index --quiet HEAD || git commit -am "Periodic repo scrape $(date)"
git push