Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albertov19/test wf1 #226

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/check-llms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Validate llms.txt

on:
pull_request:
branches:
- main

jobs:
validate-llms:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip

- name: Get SHA256 hash of the PR's llms.txt file
id: pr_llms_hash
run: |
if [ -f "llms.txt" ]; then
# Calculate SHA256 hash of the llms.txt file in the PR branch (checked out by default)
sha256sum llms.txt | awk '{ print $1 }' > pr_sha256.txt
else
echo "0000" > pr_sha256.txt
fi
cat pr_sha256.txt

- name: Generate llms.txt using the Python script
run: python3 scripts/generate_llms.py

- name: Calculate SHA256 hash of the generated llms.txt
id: generated_llms_hash
run: |
sha256sum llms.txt | awk '{ print $1 }' > generated_sha256.txt
cat generated_sha256.txt

- name: Compare the SHA256 hashes
run: |
generated_hash=$(cat generated_sha256.txt)
pr_hash=$(cat pr_sha256.txt)

if [ "$generated_hash" != "$pr_hash" ]; then
echo "Error: SHA256 hashes do not match. The generated llms.txt file differs from the one in the PR."
echo "You need to run the generate LLMS script. Check README."
exit 1
else
echo "SHA256 hashes match. The llms.txt file is consistent."
fi
264 changes: 0 additions & 264 deletions build/applications/connect/configuration-v0.md

This file was deleted.

Loading