Upgrade Python version #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Upgrade Python version | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # At 3AM on Monday (UTC) - runs after dependency updates | |
| - cron: "0 3 * * 1" | |
| jobs: | |
| upgrade_python_version: | |
| name: Upgrade Python version | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC token federation with dd-octo-sts | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: 3.13 | |
| - name: Install ddev from local folder | |
| run: |- | |
| pip install -e ./datadog_checks_dev[cli] | |
| pip install -e ./ddev | |
| - name: Configure ddev | |
| run: |- | |
| ddev config set repos.core . | |
| ddev config set repo core | |
| - name: Get GitHub token via dd-octo-sts | |
| uses: DataDog/dd-octo-sts-action@08f2144903ced3254a3dafec2592563409ba2aa0 # v1.0.1 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/integrations-core | |
| policy: self.create-pull-requests.schedule | |
| - name: Upgrade Python version | |
| id: update | |
| run: |- | |
| # Run the update command - exits 0 if already at latest, 1 on errors | |
| ddev meta scripts upgrade-python-version | |
| # Check if there are any changes | |
| if git diff --quiet; then | |
| echo "No changes detected, already at latest Python version" | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected, new Python version available" | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.update.outputs.has_changes == 'true' | |
| id: cpr | |
| uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 | |
| with: | |
| token: ${{ steps.octo-sts.outputs.token }} | |
| commit-message: Upgrade Python version | |
| body: | | |
| ### What does this PR do? | |
| Update the Python version to the latest patch release. | |
| This PR was automatically generated by the following workflow: | |
| ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| **THE CHANGELOG FILES OFTEN HAVE THE WRONG PR NUMBER. MAKE SURE TO CHECK THEM!** | |
| ### Changes | |
| - Updated `PYTHON_VERSION_FULL` in `ddev/src/ddev/repo/constants.py` | |
| - Updated Python version in `.builders/images/*/Dockerfile` (Linux and Windows) | |
| - Updated Python version in `.github/workflows/resolve-build-deps.yaml` (macOS) | |
| - Updated SHA256 hashes for Python artifacts | |
| ### Review checklist (to be filled by reviewers) | |
| - [ ] Verify the Python version and SHA256 hashes are correct | |
| - [ ] [Changelog entries](https://datadoghq.dev/integrations-core/guidelines/pr/#changelog-entries) must be created for modifications to shipped code | |
| - [ ] Add the `qa/skip-qa` label if the PR doesn't need to be tested during QA. | |
| title: Upgrade Python version | |
| branch: bot/upgrade-python-version | |
| branch-suffix: timestamp | |
| delete-branch: true | |
| base: master | |
| labels: bot,qa/skip-qa | |
| draft: false |