Repository navigation
chore(deps): bump astral-sh/setup-uv from 19b4d1e990bec64818914c40230bde93a0de300b to e105c8fb1d7b13074b851babdaef4185243c6a07 #946
Workflow file for this run
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 version on requirements change | |
| # This workflow is called on any PR created by the edx-requirements-bot. It will update the version in __init__.py, but | |
| # will *not* add anything to the changelog. | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| jobs: | |
| update_version: | |
| name: Update version | |
| runs-on: ubuntu-latest | |
| if: startsWith( github.head_ref, 'jenkins/upgrade-python-requirements' ) | |
| steps: | |
| # Clone repo | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }} | |
| # Checkout current branch | |
| - name: Checkout branch | |
| env: | |
| PR_BRANCH: ${{ github.head_ref }} | |
| run: git checkout $PR_BRANCH | |
| # Bump patch version in branch by one | |
| - name: Update version | |
| run: | | |
| current_patch_version=$(cat ./edx_credentials_themes/__init__.py | grep "__version__" | sed "s|.*[0-9]\.[0-9]\.\([0-9]*\).*|\1|g") | |
| new_patch_version=$((current_patch_version+1)) | |
| sed -i "s|\(__version__ = '[0-9]*\.[0-9]*\.\)[0-9]*|\1$new_patch_version|g" ./edx_credentials_themes/__init__.py | |
| # Set identity, commit change, squash, and push | |
| - name: Commit file | |
| run: | | |
| git config user.email ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }} | |
| git config user.name "edX requirements bot" | |
| git add ./edx_credentials_themes/__init__.py | |
| git commit -m "Bump patch version for requirements" --squash=HEAD | |
| GIT_EDITOR=true git rebase -i --autosquash HEAD~2 | |
| git push --force |