Skip to content

Commit 85cca4d

Browse files
committed
Pin setup-python action to a commit hash
1 parent 8c01615 commit 85cca4d

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.github/workflows/lib-deps-check.yaml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
7575
- name: Setup Python
7676
if: steps.changed-files.outputs.modules != ''
77-
uses: actions/setup-python@v6.2.0
77+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
7878
with:
7979
python-version: "${{ env.PYTHON_VERSION }}"
8080

@@ -83,22 +83,15 @@ jobs:
8383
id: deps-check
8484
run: |
8585
# Run deps for all modules at once
86-
python scripts/update_lib deps ${{ steps.changed-files.outputs.modules }} --depth 2 > /tmp/deps_output.txt 2>&1 || true
87-
88-
# Read output for GitHub Actions
89-
echo "deps_output<<EOF" >> $GITHUB_OUTPUT
90-
cat /tmp/deps_output.txt >> $GITHUB_OUTPUT
91-
echo "EOF" >> $GITHUB_OUTPUT
92-
93-
# Check if there's any meaningful output
94-
if [ -s /tmp/deps_output.txt ]; then
95-
echo "has_output=true" >> $GITHUB_OUTPUT
96-
else
97-
echo "has_output=false" >> $GITHUB_OUTPUT
98-
fi
86+
echo "deps_output<<EOF" >> "$GITHUB_OUTPUT"
87+
output=$(python scripts/update_lib deps "${MODULES}" --depth 2 2>&1 || true)
88+
echo "$output" >> "$GITHUB_OUTPUT"
89+
echo "EOF" >> "$GITHUB_OUTPUT"
90+
env:
91+
MODULES: ${{ steps.changed-files.outputs.modules }}
9992

10093
- name: Post comment
101-
if: steps.deps-check.outputs.has_output == 'true'
94+
if: steps.deps-check.outputs.deps_output != ''
10295
uses: marocchino/sticky-pull-request-comment@v3
10396
with:
10497
header: lib-deps-check

0 commit comments

Comments
 (0)