awesome-copilot/.github/workflows/validate-readme.yml
Aaron Powell 56d7ce73a0
Partners (#354)
* initial prototype of partners collection with featured collection support

* Starting to add the partners

* Preparing the repo for how the custom agents will work

* moving some files around

* Moving a bunch of stuff around to make the file easier to read

* improving the front matter parsing by using a real library

* Some verbage updates

* some more verbage

* Fixing spelling mistake

* tweaking badges

* Updating contributing guide to be correct

* updating casing to match product

* More agents

* Better handling link to mcp registry

* links to install mcp servers fixed up

* Updating collection tags

* writing the mcp registry url out properly

* Adding custom agents for C# and WinForms

Expert custom agents to improve your experience when working with C# and WinForms in Copilot

* Adding to agents readme

* Adding PagerDuty agent

* Fixing description for terraform agent

* Adding custom agents to the README usage

* Removing the button to make the links more obvious

* docs: relocate category READMEs to /docs and update generation + internal links

* Updating prompts for new path

* formatting

---------

Co-authored-by: Chris Patterson <chrispat@github.com>
2025-10-29 06:07:13 +11:00

87 lines
2.5 KiB
YAML

name: Validate README.md
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "instructions/**"
- "prompts/**"
- "chatmodes/**"
- "collections/**"
- "*.js"
jobs:
validate-readme:
permissions:
pull-requests: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Validate collections
run: npm run validate:collections
- name: Update README.md
run: npm start
- name: Check for file changes
id: check-diff
run: |
if git diff --exit-code; then
echo "No changes detected after running update script."
echo "status=success" >> $GITHUB_OUTPUT
else
echo "Changes detected after running update script."
echo "status=failure" >> $GITHUB_OUTPUT
echo "diff<<EOF" >> $GITHUB_OUTPUT
git diff >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
fi
- name: Output diff to logs for non-write users
if: steps.check-diff.outputs.status == 'failure' && github.event.pull_request.head.repo.permissions.push != true
run: |
echo "::group::File changes (changes needed)"
echo "The following changes need to be made:"
echo ""
git diff
echo "::endgroup::"
- name: Comment on PR if files need updating
if: steps.check-diff.outputs.status == 'failure' && github.event.pull_request.head.repo.permissions.push == true
uses: marocchino/sticky-pull-request-comment@v2
with:
header: readme-validation
message: |
## ⚠️ Generated files need to be updated
The update script detected changes that need to be made.
Please run `npm start` locally and commit the changes before merging this PR.
<details>
<summary>View diff</summary>
```diff
${{ steps.check-diff.outputs.diff }}
```
</details>
- name: Fail workflow if files need updating
if: steps.check-diff.outputs.status == 'failure'
run: |
echo "❌ Generated files need to be updated. Please run `npm start` locally and commit the changes."
exit 1