APIs Guru Ratings #4
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: APIs Guru Ratings | |
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: "0 17,22 * * 1-5" | |
jobs: | |
generate: | |
name: Update API Ratings | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "read" | |
id-token: "write" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
token: ${{ secrets.GH_TOKEN_COMMIT_AND_BYPASS_BRANCH_PROTECTION }} | |
- name: Setup Git | |
run: | | |
git config user.name "Integration Service" | |
git config user.email "<[email protected]>" | |
- id: "auth-gcp" | |
name: "Authenticate to Google Cloud" | |
uses: "google-github-actions/auth@v1" | |
with: | |
token_format: "access_token" | |
workload_identity_provider: projects/196494084534/locations/global/workloadIdentityPools/github-actions-wi-pool/providers/github-actions-wi-provider | |
service_account: "[email protected]" | |
- uses: actions/checkout@v4 | |
with: | |
repository: "APIs-guru/openapi-directory" | |
path: "openapi-directory" | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "npm" | |
- run: npm ci | |
- run: npm run build | |
- run: node apis-guru.mjs | |
working-directory: apps/api | |
env: | |
GOOGLE_CLOUD_STORAGE_BUCKET: rate-my-open-api-prod | |
GOOGLE_CLOUD_PROJECT_ID: zuplo-marketing | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
- name: git add changed files | |
run: git add apis-guru.json | |
- name: Commit Updated API Ratings | |
run: | | |
git commit -m "Updated API Ratings" | |
git push origin main |