Skip to content

Commit

Permalink
feat: add option to specify save strategy (#13)
Browse files Browse the repository at this point in the history
* add option to specify save strategy

* update README with default values
  • Loading branch information
veriff-saulvargas committed May 16, 2024
1 parent bc4ebf4 commit 220b513
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ with:
# The PR title
pr-title: "Update dependencies"
# The update strategy, can be 'reuse', 'eager' or 'all'
update-strategy: eager
update-strategy: reuse
# The save strategy, can 'compatible', 'wildcard', 'exact' or 'minimum'
save-strategy: minimum
# Ignore the version constraint of packages in pyproject.toml
unconstrained: true
unconstrained: false
# Whether to install PDM plugins before update
install-plugins: "false"
# Whether commit message contains signed-off-by
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: "The update strategy, can be 'reuse', 'eager' or 'all'"
required: false
default: "reuse"
save-strategy:
description: "The save strategy, can be 'compatible', 'wildcard', 'exact' or 'minimum'"
required: false
default: "minimum"
unconstrained:
description: "Ignore the version constraint of packages in pyproject.toml"
required: false
Expand Down Expand Up @@ -45,7 +49,7 @@ runs:
shell: bash

- name: "Update dependencies"
run: pdm update --no-sync --update-${{ inputs.update-strategy }} ${{ inputs.unconstrained == 'true' && '--unconstrained' || '' }}
run: pdm update --no-sync --update-${{ inputs.update-strategy }} --save-${{ inputs.save-strategy }} ${{ inputs.unconstrained == 'true' && '--unconstrained' || '' }}
shell: bash
id: pdm-update

Expand Down

0 comments on commit 220b513

Please sign in to comment.