From 93cbc6c6559b5d92bf504498a91ab5cdaba5dbbc Mon Sep 17 00:00:00 2001 From: Tomuta Gabriel Date: Tue, 17 Feb 2026 14:31:32 +0200 Subject: [PATCH 1/2] Weekly job creates gh issue on new python version --- .github/workflows/weekly.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 3739ecd..1db9620 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -14,10 +14,14 @@ 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') @@ -25,12 +29,28 @@ jobs: 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 < Date: Tue, 17 Feb 2026 14:38:17 +0200 Subject: [PATCH 2/2] Update badge to not require manual changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a73619..e9f31ea 100644 --- a/README.md +++ b/README.md @@ -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)