File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 26
26
jobs :
27
27
update :
28
28
runs-on : ubuntu-latest
29
+ permissions :
30
+ contents : write
31
+ pull-requests : write
32
+ issues : read
29
33
steps :
30
34
- name : Checkout repo
31
35
uses : actions/checkout@v4
95
99
96
100
- name : Create Pull Request
97
101
if : steps.changes.outputs.HAS_CHANGES == 'true'
102
+ id : create_pr
98
103
uses : peter-evans/create-pull-request@v6
99
104
with :
100
105
token : ${{ secrets.GITHUB_TOKEN }}
@@ -135,11 +140,19 @@ jobs:
135
140
- name : Summary
136
141
run : |
137
142
if [ "${{ steps.changes.outputs.HAS_CHANGES }}" == "true" ]; then
138
- echo "✅ Pull request created successfully!"
139
- echo "📋 Summary:"
140
- echo " - Version: ${{ steps.version.outputs.NEW_VERSION }}"
141
- echo " - Dependencies updated: ${{ inputs.update_dependencies }}"
142
- echo " - API generated: ${{ inputs.generate_api }}"
143
+ if [ "${{ steps.create_pr.outputs.pull-request-number }}" != "" ]; then
144
+ echo "✅ Pull request created successfully!"
145
+ echo "🔗 PR URL: ${{ steps.create_pr.outputs.pull-request-url }}"
146
+ echo "📋 Summary:"
147
+ echo " - PR Number: #${{ steps.create_pr.outputs.pull-request-number }}"
148
+ echo " - Version: ${{ steps.version.outputs.NEW_VERSION }}"
149
+ echo " - Dependencies updated: ${{ inputs.update_dependencies }}"
150
+ echo " - API generated: ${{ inputs.generate_api }}"
151
+ else
152
+ echo "❌ Failed to create pull request!"
153
+ echo "Please check the workflow logs for more details."
154
+ exit 1
155
+ fi
143
156
else
144
157
echo "ℹ️ No changes were made, so no PR was created."
145
158
fi
You can’t perform that action at this time.
0 commit comments