♻️ Update Dependencies #37
This file contains 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
--- | |
# SPDX-License-Identifier: Apache-2.0 | |
# SPDX-FileCopyrightText: 2024 The Linux Foundation <https://linuxfoundation.org> | |
name: "♻️ Update Dependencies" | |
# yamllint disable-line rule:truthy | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 8 1 * *" | |
push: | |
branches: | |
- "main" | |
- "master" | |
paths: | |
- "!pdm.lock" | |
env: | |
python-version: 3.11 | |
permissions: {} | |
jobs: | |
repository: | |
name: "Repository Checks" | |
if: startsWith(github.ref, 'dep/update-pdm-lock') != true | |
uses: os-climate/osc-github-devops/.github/workflows/repository.yaml@main | |
permissions: | |
# Required for action that creates labels: github-mandatory-labels | |
contents: read | |
python-dependencies: | |
name: "Update Python Dependencies" | |
needs: | |
- repository | |
# Only run if Python code is present in repository | |
if: (needs.repository.outputs.python_project == 'true' || | |
needs.repository.outputs.jupyter_notebooks == 'true') && | |
startsWith(github.ref, 'dep/update-pdm-lock') != true | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: mandatory to raise the PR | |
id-token: write | |
pull-requests: write | |
repository-projects: write | |
contents: write | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Set up Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python-version }} | |
- name: "Update Python dependencies" | |
uses: pdm-project/update-deps-action@v1.9 | |
with: | |
sign-off-commit: "true" | |
token: ${{ github.token }} | |
commit-message: "Chore: Update dependencies and pdm.lock [skip ci]" | |
pr-title: "Update Python module dependencies" | |
update-strategy: eager | |
# Whether to install PDM plugins before update | |
install-plugins: "false" |