Skip to content

Commit 79266f0

Browse files
committed
fix
1 parent 2e138f7 commit 79266f0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/update-snowflake-feature-coverage.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ jobs:
4444
id: check-for-changes
4545
working-directory: localstack-docs
4646
run: |
47-
# Check if there are changed files and store the result in resources/diff-check.log
48-
# Check against the PR branch if it exists, otherwise against the main
49-
# Store the result in resources/diff-check.log and store the diff count in the GitHub Action output "diff-count"
50-
mkdir -p resources
51-
(git diff --name-only origin/snowflake-feature-coverage-updates src/content/docs/snowflake/features/index.md src/content/docs/snowflake/sql-functions.md 2>/dev/null || git diff --name-only origin/${{ github.event.inputs.targetBranch || 'main' }} src/content/docs/snowflake/features/index.md src/content/docs/snowflake/sql-functions.md 2>/dev/null) | tee resources/diff-check.log
52-
echo "diff-count=$(cat resources/diff-check.log | wc -l)" >> $GITHUB_OUTPUT
53-
cat resources/diff-check.log
47+
git add .
48+
if git diff --staged --quiet; then
49+
echo "diff-count=0" >> $GITHUB_OUTPUT
50+
else
51+
echo "diff-count=1" >> $GITHUB_OUTPUT
52+
fi
5453
5554
- name: Create PR
5655
uses: peter-evans/create-pull-request@v7

0 commit comments

Comments
 (0)