Skip to content

Commit

Permalink
Update requirements-up-to-date.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
michplunkett committed Dec 10, 2024
1 parent c813fad commit 3c314ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/requirements-up-to-date.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run: |
echo "Checking for changes in uv.lock or pyproject.toml..."
CHANGES=$(git diff --name-only origin/main --)
if echo "$CHANGES" | grep -qE "^(uv.lock|pyproject.toml)$"; then
echo "uv.lock or pyproject.toml has changed."
echo "files_changed=true" >> $GITHUB_ENV
Expand All @@ -34,9 +35,10 @@ jobs:
if: env.files_changed == 'true'
run: |
echo "Validating requirements.txt update..."
CHANGED_FILES=$(git diff --name-only origin/main --)
# Check if requirements.txt has been updated
if echo git diff --name-only origin/main -- | grep -q "^requirements.txt$"; then
if echo "$CHANGED_FILES" | grep -q "^requirements.txt$"; then
echo "requirements.txt has been updated."
else
echo "ERROR: pyproject.toml or uv.lock has changed, but requirements.txt has not been updated."
Expand Down

0 comments on commit 3c314ca

Please sign in to comment.