Skip to content

Commit 5480d87

Browse files
authored
Merge pull request #13 from dotutils/dev/jankrivanek/copilot-pipeline-poc
Dev/jankrivanek/copilot pipeline poc
2 parents b9be911 + 77e2e4a commit 5480d87

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/poc.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Run Copilot Cli PoC
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
9+
jobs:
10+
run-poc:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
pull-requests: write
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '24'
24+
25+
- name: Install GitHub Copilot CLI
26+
run: |
27+
npm install -g @github/copilot || {
28+
echo "Error: Failed to install GitHub Copilot CLI"
29+
exit 1
30+
}
31+
32+
- name: Query Copilot
33+
id: analyze
34+
run: |
35+
if ! copilot -p "How many C# files are in this repository?" > analysis.txt 2>copilot-error.log; then
36+
echo "Error: Copilot CLI failed"
37+
echo "Error details:"
38+
cat copilot-error.log
39+
exit 1
40+
fi
41+
42+
if [ ! -s analysis.txt ]; then
43+
echo "Error: Copilot produced no output"
44+
exit 1
45+
fi
46+
47+
cat analysis.txt

0 commit comments

Comments
 (0)