Skip to content

Update transient dependencies #16

Update transient dependencies

Update transient dependencies #16

name: Update transient dependencies
on:
workflow_dispatch:
branches:
- develop_dependencies
permissions:
teams:
- Fusion-Power-Plant-Framework/repo-review
jobs:
dep_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.FPPF_BOT_AUTH_KEY }}
- name: Permissions Check
uses: ./.github/workflows/actions/permission_check
with:
token: ${{ secrets.FPPF_BOT_AUTH_KEY }}
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run uv
id: uv
env:
GITHUB_TOKEN: ${{ secrets.FPPF_BOT_AUTH_KEY }}
shell: bash
run: |
python -m pip install --upgrade pip
pip install uv
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/base.txt
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/develop.txt --extra dev
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/examples.txt --extra examples
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/all.txt --extra dev --extra polyscope --extra radiation --extra examples
git config user.email "[email protected]"
git config user.name "fppf-bot"
git checkout -b fppf/sub_dependencies
git add requirements
if [[ -n $(git status --porcelain) ]] ; then
git commit -m "Updated transient dependencies"
git push --set-upstream origin fppf/sub_dependencies
echo new_commit='1' >> $GITHUB_OUTPUT
else
echo new_commit='' >> $GITHUB_OUTPUT
fi
- name: Create PR to update transient dependencies
if: steps.uv.outputs.new_commit != ''
env:
GITHUB_TOKEN: ${{ secrets.FPPF_BOT_AUTH_KEY }}
shell: bash
run: |
PR_URL=$(gh pr create \
--head fppf/sub_dependencies \
--base develop_dependencies \
--title "Sub-dependency update" \
--body "Update transient dependency pinning")