Skip to content

Commit 2e0c065

Browse files
committed
Maybe?
1 parent 1ae2327 commit 2e0c065

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

action.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# action.yml
12
name: "Update SPEC 0 dependencies"
23
description: "Update the lower bounds of Python dependencies covered by the Scientific Python SPEC 0 support schedule"
34
author: Scientific Python Developers
5+
46
inputs:
57
target_branch:
68
description: "Target branch for the pull request"
@@ -54,29 +56,31 @@ runs:
5456
shell: bash
5557
run: |
5658
set -e
57-
echo "Updating ${{inputs.project_file_name}} using schedule ${{inputs.schedule_path}}"
58-
pixi run --manifest-path ${{ github.action_path }}/pyproject.toml update-dependencies "${{ github.workspace }}/${{ inputs.project_file_name }}" "${{ github.workspace }}/${{ inputs.schedule_path }}"
59+
echo "Updating ${{ inputs.project_file_name }} using schedule ${{ inputs.schedule_path }}"
60+
pixi run --manifest-path ${{ github.action_path }}/pyproject.toml update-dependencies "${{ github.workspace }}/${{ inputs.project_file_name }}" "${{ github.workspace }}/${{ inputs.schedule_path }}"
5961
- name: Changes
62+
id: changes
6063
shell: bash
6164
run: |
6265
echo "Showing changes that would be committed"
6366
git --no-pager diff ${{ inputs.project_file_name }}
6467
if git diff --quiet ${{ inputs.project_file_name }}; then
65-
echo "changes_detected=false" >> $GITHUB_OUTPUT
68+
echo "changes_detected=false" >> "$GITHUB_OUTPUT"
6669
else
67-
echo "changes_detected=true" >> $GITHUB_OUTPUT
70+
echo "changes_detected=true" >> "$GITHUB_OUTPUT"
6871
fi
6972
- name: Create Pull Request
70-
if: ${{ inputs.create_pr == 'true' }} && steps.Changes.outputs.changes_detected == 'true'
73+
if: ${{ fromJSON(inputs.create_pr) && fromJSON(steps.changes.outputs.changes_detected) }}
7174
uses: peter-evans/create-pull-request@v7
7275
with:
7376
token: ${{ inputs.token }}
7477
commit-message: ${{ inputs.commit_msg }}
75-
path: ${{ inputs.project_file_name }}
7678
title: ${{ inputs.pr_title }}
7779
body: "This PR was created automatically"
7880
base: ${{ inputs.target_branch }}
7981
branch: update-spec0-dependencies-${{ github.run_id }}
82+
add-paths: |
83+
${{ inputs.project_file_name }}
8084
8185
branding:
8286
icon: "check-square"

0 commit comments

Comments
 (0)