Update RMS Models #51
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 RMS Models | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 5 * * *" | |
| env: | |
| MAIN_PYTHON_VERSION: '3.12' | |
| jobs: | |
| update-models: | |
| name: Update models | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Start HPS services | |
| id: hps-services | |
| uses: ansys/pyhps/.github/actions/hps_services@main | |
| with: | |
| token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| ghcr-username: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
| ghcr-token: ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }} | |
| version: 'latest-dev' | |
| feature: 'main' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -e .[build] | |
| pip install pre-commit | |
| - name: Run script | |
| run: | | |
| python .ci/generate_rms_models.py | |
| - name: "Create PR if changes detected" | |
| if: startsWith(github.ref, 'refs/heads/main') | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[Auto] Update RMS models" | |
| body: An update of auto-generated RMS models has been triggered either manually or by a scheduled workflow. | |
| base: main | |
| branch: maint/rms-model-update | |
| delete-branch: true | |
| token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
| add-paths: | | |
| src/ansys/hps/client/rms/models.py | |