Skip to content

Commit 6fa40e4

Browse files
Update demo-build.yml from feature/build-doctor
1 parent d041713 commit 6fa40e4

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/demo-build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,30 @@ jobs:
1818
cache: maven
1919
- name: Build with Maven
2020
run: mvn clean install
21+
22+
diagnose:
23+
needs: build
24+
if: failure()
25+
runs-on: ubuntu-latest
26+
permissions:
27+
actions: read
28+
contents: read
29+
issues: write
30+
pull-requests: write
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Set up Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '20'
37+
- name: Install dependencies
38+
run: npm install @actions/github @google/generative-ai @octokit/core
39+
- name: Run Build Doctor Analysis
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
43+
WORKFLOW_RUN_ID: ${{ github.run_id }}
44+
WORKFLOW_NAME: ${{ github.workflow }}
45+
REPO_OWNER: ${{ github.repository_owner }}
46+
REPO_NAME: ${{ github.event.repository.name }}
47+
run: node .github/scripts/analyze-failure.js

0 commit comments

Comments
 (0)