Update Python versions #26225
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: Update Python versions | |
| on: | |
| schedule: | |
| - cron: "5 * * * *" | |
| workflow_dispatch: | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| persist-credentials: false | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31 | |
| - name: Install Cachix | |
| uses: cachix/cachix-action@v17 | |
| with: | |
| name: nixpkgs-python | |
| extraPullNames: devenv | |
| - name: Install devenv.sh | |
| run: nix profile install github:cachix/devenv/latest | |
| - name: Update Python versions | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: devenv shell -- nixpkgs-python-update | |
| - name: Create Pull Request | |
| id: create-pull-request | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| commit-message: Update Python versions | |
| title: Update Python versions | |
| body: | | |
| Automatically created pull-request to update Python versions. | |
| This is the result of running: | |
| ``` | |
| devenv shell -- nixpkgs-python-update | |
| ``` | |
| delete-branch: true | |
| - if: ${{ steps.create-pull-request.outputs.pull-request-operation == 'created' }} | |
| uses: peter-evans/enable-pull-request-automerge@v3 | |
| with: | |
| pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }} |