Skip to content
Open
Show file tree
Hide file tree
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
34 changes: 27 additions & 7 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,43 @@ jobs:

check-python-version:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check for new Python versions
env:
GH_TOKEN: ${{ github.token }}
run: |
latest=$(curl -s https://endoflife.date/api/python.json | \
jq -r '[.[] | select(.cycle | test("^3\\.[0-9]+$"))] | .[0].cycle')

echo "Latest stable Python: $latest"
echo "Known latest: $LATEST_KNOWN_PYTHON"

if [ "$latest" != "$LATEST_KNOWN_PYTHON" ]; then
echo "::warning::New Python version $latest is available! Manual update is required."

echo "## :warning: New Python Version Available" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Python **$latest** has been released (currently testing up to $LATEST_KNOWN_PYTHON)." >> $GITHUB_STEP_SUMMARY
else
if [ "$latest" = "$LATEST_KNOWN_PYTHON" ]; then
echo "Python version is up to date."
exit 0
fi

# Check if an issue already exists
existing=$(gh issue list --label "python-version" --state open --json number -q '.[0].number')

if [ -n "$existing" ]; then
echo "Issue #$existing already exists, skipping."
exit 0
fi

gh issue create \
--title "Update Python support to $latest" \
--label "python-version" \
--body "$(cat <<EOF
Python **$latest** has been released (currently testing up to **$LATEST_KNOWN_PYTHON**).

## Required changes
- [ ] Add \`$latest\` to the Python matrix in \`.github/workflows/build.yml\` (line 19)
- [ ] Add \`Programming Language :: Python :: $latest\` classifier in \`setup.py\` (line 131)
- [ ] Update \`LATEST_KNOWN_PYTHON\` to \`$latest\` in \`.github/workflows/weekly.yml\` (line 9)
EOF
)"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

![Build](https://github.com/eclipse-ankaios/ank-sdk-python/actions/workflows/build.yml/badge.svg?job=build)
![PyPI - Version](https://img.shields.io/pypi/v/ankaios_sdk)
![Python](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12%20|%203.13-blue)
![Python](https://img.shields.io/pypi/pyversions/ankaios_sdk)

![License](https://img.shields.io/badge/license-Apache%202.0-blue)
[![Ankaios](https://img.shields.io/badge/main_project-repo-blue)](https://github.com/eclipse-ankaios/ankaios)
Expand Down