Skip to content
Merged
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
23 changes: 8 additions & 15 deletions .github/workflows/lib-deps-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

- name: Get changed Lib files
id: changed-files
run: |

Check warning on line 46 in .github/workflows/lib-deps-check.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:27:28: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/lib-deps-check.yaml:46:9: shellcheck reported issue in this script: SC2086:info:27:28: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 46 in .github/workflows/lib-deps-check.yaml

View workflow job for this annotation

GitHub Actions / format_check

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2076:warning:20:43: Remove quotes from right-hand side of =~ to match as a regex rather than literally [shellcheck] Raw Output: w:.github/workflows/lib-deps-check.yaml:46:9: shellcheck reported issue in this script: SC2076:warning:20:43: Remove quotes from right-hand side of =~ to match as a regex rather than literally [shellcheck]
# Get the list of changed files under Lib/
changed=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} -- 'Lib/*.py' 'Lib/**/*.py' | head -50)
echo "Changed files:"
Expand Down Expand Up @@ -74,7 +74,7 @@

- name: Setup Python
if: steps.changed-files.outputs.modules != ''
uses: actions/[email protected]
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "${{ env.PYTHON_VERSION }}"

Expand All @@ -83,22 +83,15 @@
id: deps-check
run: |
# Run deps for all modules at once
python scripts/update_lib deps ${{ steps.changed-files.outputs.modules }} --depth 2 > /tmp/deps_output.txt 2>&1 || true

# Read output for GitHub Actions
echo "deps_output<<EOF" >> $GITHUB_OUTPUT
cat /tmp/deps_output.txt >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# Check if there's any meaningful output
if [ -s /tmp/deps_output.txt ]; then
echo "has_output=true" >> $GITHUB_OUTPUT
else
echo "has_output=false" >> $GITHUB_OUTPUT
fi
echo "deps_output<<EOF" >> "$GITHUB_OUTPUT"
output=$(python scripts/update_lib deps "${MODULES}" --depth 2 2>&1 || true)
echo "$output" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
env:
MODULES: ${{ steps.changed-files.outputs.modules }}

- name: Post comment
if: steps.deps-check.outputs.has_output == 'true'
if: steps.deps-check.outputs.deps_output != ''
uses: marocchino/sticky-pull-request-comment@v3
with:
header: lib-deps-check
Expand Down
Loading