Skip to content

Commit

Permalink
Set automation job to generate AI responses
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim authored Sep 29, 2023
1 parent 1b21689 commit 1993ec8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/.workflows/generate-ai-responses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Purple AI Updater
on: workflow_dispatch
schedule:
- cron: '0 3 * * 4'
jobs:
purpleAIUpdater:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: env
- name: Install dependencies
run: npm ci
- name: Configure github credentials
run: |
git config --local user.name "${GITHUB_ACTOR}"
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Run Purple AI Updater script
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_ENDPOINT: ${{ secrets.OPENAI_API_ENDPOINT }}
OPENAI_FLOW_ID: ${{ secrets.OPENAI_FLOW_ID }}
SCOPE: ${{ secrets.SCOPE }}
GOOGLE_CLIENT_EMAIL: ${{ secrets.GOOGLE_CLIENT_EMAIL }}
GOOGLE_PRIVATE_KEY: ${{ secrets.GOOGLE_PRIVATE_KEY }}
GOOGLE_SHEET_ID: ${{ secrets.GOOGLE_SHEET_ID }}
run: |
node updater/purpleAIUpdater.js
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: errors.txt
path: errors.txt

0 comments on commit 1993ec8

Please sign in to comment.