Files
OpenBB/.github/workflows/askgit-data-sync.yml
DidierRLopes dbab613eca Update askgit-data-sync.yml (#824)
Based on @patrickdevivo suggestions
2021-10-18 15:11:18 +01:00

34 lines
1.3 KiB
YAML
Vendored

on:
schedule:
- cron: '0 0 * * *' # at midnight (utc) every day
jobs:
build:
name: Run AskGit
runs-on: ubuntu-latest
steps:
- name: Checkout AskGit repo
uses: actions/checkout@v2
with:
repository: askgitdev/askgit
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install libgit2
run: sudo ./scripts/install_libgit2.sh
- name: Build AskGit
run: |
make
cp .build/askgit /usr/local/bin/askgit
- name: Sync tables
run: |
export PGSYNC=1
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export GITHUB_PER_PAGE=50
export POSTGRES_CONNECTION=${{ secrets.POSTGRES_CONNECTION }}
askgit pgsync pull_requests "SELECT * FROM github_repo_prs('GamestonkTerminal/GamestonkTerminal')"
askgit pgsync issues "SELECT * FROM github_repo_issues('GamestonkTerminal/GamestonkTerminal')"
askgit pgsync repos "SELECT * FROM github_org_repos('GamestonkTerminal')"
askgit pgsync commit_stats "SELECT * FROM commits('https://github.com/GamestonkTerminal/GamestonkTerminal'), stats('https://github.com/GamestonkTerminal/GamestonkTerminal', commits.hash)"
askgit pgsync stargazers "SELECT * FROM github_stargazers('GamestonkTerminal/GamestonkTerminal')"