Skip to content

genai investigator

genai investigator #13

name: genai investigator
on:
workflow_run:
workflows: ["build"]
types:
- completed
permissions:
contents: read
actions: read
pull-requests: write
jobs:
logging:
runs-on: ubuntu-latest
steps:
- name: Print workflow_run event
run: echo "${{ toJson(github.event.workflow_run) }}"
check_failure:
# Only run this job if the workflow run concluded with a failure
# and was triggered by a pull request event
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 10
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: yarn
- run: yarn install --frozen-lockfile
- name: compile
run: yarn compile
- name: genaiscript gai
run: node packages/cli/built/genaiscript.cjs run gai -prc --vars "failure_run_id=${{ github.event.workflow_run.id }}" --out-trace $GITHUB_STEP_SUMMARY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }}
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}