Skip to content

Commit 9bdcff4

Browse files
authored
Add Summarize new issues action
Added step to set up Java JDK with Liberica distribution.
1 parent 3c4c9e3 commit 9bdcff4

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/summary.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Summarize new issues
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
summary:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
models: read
13+
contents: read
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Setup Java JDK
19+
uses: actions/setup-java@v5.0.0
20+
with:
21+
java-version: 17
22+
distribution: "liberica"
23+
java-package: jdk+fx
24+
- name: Run AI inference
25+
id: inference
26+
uses: actions/ai-inference@v1
27+
with:
28+
prompt: |
29+
Summarize the following GitHub issue in one paragraph:
30+
Title: ${{ github.event.issue.title }}
31+
Body: ${{ github.event.issue.body }}
32+
33+
- name: Comment with AI summary
34+
run: |
35+
gh issue comment $ISSUE_NUMBER --body '${{ steps.inference.outputs.response }}'
36+
env:
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
ISSUE_NUMBER: ${{ github.event.issue.number }}
39+
RESPONSE: ${{ steps.inference.outputs.response }}

0 commit comments

Comments
 (0)