|
| 1 | +# action.yml |
1 | 2 | name: "Update SPEC 0 dependencies" |
2 | 3 | description: "Update the lower bounds of Python dependencies covered by the Scientific Python SPEC 0 support schedule" |
3 | 4 | author: Scientific Python Developers |
| 5 | + |
4 | 6 | inputs: |
5 | 7 | target_branch: |
6 | 8 | description: "Target branch for the pull request" |
@@ -54,29 +56,31 @@ runs: |
54 | 56 | shell: bash |
55 | 57 | run: | |
56 | 58 | 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 }}" |
59 | 61 | - name: Changes |
| 62 | + id: changes |
60 | 63 | shell: bash |
61 | 64 | run: | |
62 | 65 | echo "Showing changes that would be committed" |
63 | 66 | git --no-pager diff ${{ inputs.project_file_name }} |
64 | 67 | if git diff --quiet ${{ inputs.project_file_name }}; then |
65 | | - echo "changes_detected=false" >> $GITHUB_OUTPUT |
| 68 | + echo "changes_detected=false" >> "$GITHUB_OUTPUT" |
66 | 69 | else |
67 | | - echo "changes_detected=true" >> $GITHUB_OUTPUT |
| 70 | + echo "changes_detected=true" >> "$GITHUB_OUTPUT" |
68 | 71 | fi |
69 | 72 | - 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) }} |
71 | 74 | uses: peter-evans/create-pull-request@v7 |
72 | 75 | with: |
73 | 76 | token: ${{ inputs.token }} |
74 | 77 | commit-message: ${{ inputs.commit_msg }} |
75 | | - path: ${{ inputs.project_file_name }} |
76 | 78 | title: ${{ inputs.pr_title }} |
77 | 79 | body: "This PR was created automatically" |
78 | 80 | base: ${{ inputs.target_branch }} |
79 | 81 | branch: update-spec0-dependencies-${{ github.run_id }} |
| 82 | + add-paths: | |
| 83 | + ${{ inputs.project_file_name }} |
80 | 84 |
|
81 | 85 | branding: |
82 | 86 | icon: "check-square" |
|
0 commit comments