|
| 1 | +name: Update README with supported versions |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: '0 6 * * 1' # Weekly on Monday at 6 AM UTC (after main builds) |
| 7 | + workflow_run: |
| 8 | + workflows: ["platforms-dispatches"] |
| 9 | + types: [completed] |
| 10 | + branches: [main] |
| 11 | + |
| 12 | +jobs: |
| 13 | + update-readme: |
| 14 | + name: Update README with current supported versions |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout repository |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + |
| 23 | + - name: Setup Python |
| 24 | + uses: actions/setup-python@v5 |
| 25 | + with: |
| 26 | + python-version: '3.11' |
| 27 | + |
| 28 | + - name: Install dependencies |
| 29 | + run: | |
| 30 | + python -m pip install --upgrade pip |
| 31 | + python -m pip install requests python-dateutil |
| 32 | +
|
| 33 | + - name: Generate supported versions |
| 34 | + id: generate |
| 35 | + run: | |
| 36 | + python supported_versions.py ${{ secrets.IDF_VERSIONS_TXT }} |
| 37 | + # Capture the supported Python versions for PR description |
| 38 | + PYTHON_VERSIONS=$(jq -c '.supported_python' supported_versions.json) |
| 39 | + echo "supported_python=$PYTHON_VERSIONS" >> $GITHUB_OUTPUT |
| 40 | +
|
| 41 | + - name: Update README with supported Python versions |
| 42 | + run: | |
| 43 | + python update_readme_versions.py |
| 44 | +
|
| 45 | + - name: Check for changes |
| 46 | + id: changes |
| 47 | + run: | |
| 48 | + if git diff --quiet README.md; then |
| 49 | + echo "has_changes=false" >> $GITHUB_OUTPUT |
| 50 | + echo "No changes detected in README.md" |
| 51 | + else |
| 52 | + echo "has_changes=true" >> $GITHUB_OUTPUT |
| 53 | + echo "Changes detected in README.md" |
| 54 | + git diff README.md |
| 55 | + fi |
| 56 | +
|
| 57 | + - name: Create Pull Request |
| 58 | + if: steps.changes.outputs.has_changes == 'true' |
| 59 | + uses: peter-evans/create-pull-request@v6 |
| 60 | + with: |
| 61 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + commit-message: | |
| 63 | + Update README with current supported Python versions |
| 64 | +
|
| 65 | + Auto-updated by update-readme workflow based on current ESP-IDF and Python support lifecycle. |
| 66 | +
|
| 67 | + Changes: |
| 68 | + - Updated supported Python versions in README.md based on dynamic version detection |
| 69 | + - Python versions are determined by ESP-IDF lifecycle and Python EOL dates |
| 70 | + title: "📝 Update README with current supported Python versions" |
| 71 | + body: | |
| 72 | + ## Summary |
| 73 | + This PR automatically updates the README.md with the current supported Python versions based on our dynamic version detection system. |
| 74 | +
|
| 75 | + ## Changes Made |
| 76 | + - ✅ Updated "Supported Python versions" section in README.md |
| 77 | + - 🔄 Based on ESP-IDF lifecycle and Python EOL dates |
| 78 | + - 🤖 Generated by automated workflow |
| 79 | +
|
| 80 | + ## Python Versions Updated |
| 81 | + The following Python versions are currently supported: |
| 82 | + ``` |
| 83 | + ${{ steps.generate.outputs.supported_python }} |
| 84 | + ``` |
| 85 | +
|
| 86 | + ## Verification |
| 87 | + - [ ] Python versions match our build matrix |
| 88 | + - [ ] No other sections of README were modified |
| 89 | + - [ ] All supported versions are actively maintained |
| 90 | +
|
| 91 | + --- |
| 92 | +
|
| 93 | + > **Note**: This PR was automatically created by the [update-readme workflow](.github/workflows/update-readme.yml). |
| 94 | + > The Python versions are dynamically determined based on ESP-IDF support lifecycle. |
| 95 | + branch: update/readme-python-versions |
| 96 | + delete-branch: true |
| 97 | + assignees: ${{ github.actor }} |
| 98 | + reviewers: jakub-kocka |
| 99 | + labels: | |
| 100 | + documentation |
| 101 | + automated |
| 102 | + python-versions |
0 commit comments