File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626jobs :
2727 update :
2828 runs-on : ubuntu-latest
29+ permissions :
30+ contents : write
31+ pull-requests : write
32+ issues : read
2933 steps :
3034 - name : Checkout repo
3135 uses : actions/checkout@v4
9599
96100 - name : Create Pull Request
97101 if : steps.changes.outputs.HAS_CHANGES == 'true'
102+ id : create_pr
98103 uses : peter-evans/create-pull-request@v6
99104 with :
100105 token : ${{ secrets.GITHUB_TOKEN }}
@@ -135,11 +140,19 @@ jobs:
135140 - name : Summary
136141 run : |
137142 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
143156 else
144157 echo "ℹ️ No changes were made, so no PR was created."
145158 fi
You can’t perform that action at this time.
0 commit comments