Add poc action #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build project | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Install GitHub Copilot CLI | |
| run: | | |
| npm install -g @github/copilot || { | |
| echo "Error: Failed to install GitHub Copilot CLI" | |
| exit 1 | |
| } | |
| - name: Query Copilot | |
| id: analyze | |
| run: | | |
| if ! copilot -p "How many C# files are in this repository?" > analysis.txt 2>copilot-error.log; then | |
| echo "Error: Copilot CLI failed" | |
| echo "Error details:" | |
| cat copilot-error.log | |
| exit 1 | |
| fi | |
| if [ ! -s analysis.txt ]; then | |
| echo "Error: Copilot produced no output" | |
| exit 1 | |
| fi | |
| cat analysis.txt |