File tree Expand file tree Collapse file tree 1 file changed +35
-3
lines changed Expand file tree Collapse file tree 1 file changed +35
-3
lines changed Original file line number Diff line number Diff line change 88
99permissions : {}
1010
11+ defaults :
12+ run :
13+ working-directory : aws-cli
14+
1115jobs :
12- pipx -check-versions :
16+ npm -check-versions :
1317 runs-on : ubuntu-latest
1418 steps :
15- - name : Check the versions
19+ - name : Check out
20+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+ with :
22+ persist-credentials : false
23+ - name : Set up Python
24+ uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
25+ with :
26+ python-version : 3.14
27+ - name : Check outdated dependencies
1628 shell : bash
1729 run : |
1830 set -euo pipefail
1931 IFS=$'\n\t'
20- docker run --pull always -t --user root --entrypoint /bin/sh "leplusorg/${GITHUB_REPOSITORY#*/docker-}:main" -c 'if pipx upgrade-all --global | tee -a /dev/stderr | grep -q -e "^upgraded "; then exit 1; fi'
32+ rc=0
33+ # Read each line from requirements.txt
34+ while IFS= read -r line; do
35+ # Skip empty lines and comments
36+ if [[ -z "$line" || "$line" =~ ^# ]]; then
37+ continue
38+ fi
39+ # Extract package name and current version
40+ if [[ "$line" =~ ^([a-zA-Z0-9_-]+)==([0-9.]+) ]]; then
41+ package="${BASH_REMATCH[1]}"
42+ current_version="${BASH_REMATCH[2]}"
43+ # Get latest version from PyPI using pip index versions
44+ # The version in parentheses on the first line is the latest
45+ latest_version="$(\pip index versions "${package}" 2>/dev/null | { \grep -e '^Available versions: ' || true; } | \cut -d ',' -f 1 | \sed -e 's/^.*: //')"
46+ if [ "${current_version}" != "${latest_version}" ]; then
47+ echo "${package}: ${current_version} -> ${latest_version}"
48+ rc=$((rc+1))
49+ fi
50+ fi
51+ done < requirements.txt
52+ exit ${rc}
You can’t perform that action at this time.
0 commit comments