88 # Manual trigger option
99 workflow_dispatch :
1010 inputs :
11- strategy :
12- description : How to publish updates
13- type : choice
14- options :
15- - pr
16- - direct
17- default : pr
1811 force_update :
1912 description : Continue even if checks fail
2013 type : boolean
2316permissions :
2417 contents : write
2518 actions : read
26- pull-requests : write
2719
2820env :
29- UPDATE_STRATEGY : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.strategy || 'pr' }}
3021 FORCE_UPDATE : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force_update || 'false' }}
31- OWNER_NAME : ${{ github.repository_owner }}
22+ OWNER_NAME : oxyzenQ
3223 OWNER_EMAIL : 130107241+oxyzenQ@users.noreply.github.com
33- BASE_BRANCH : ${{ github.ref_name }}
24+ BASE_BRANCH : ${{ github.event.repository.default_branch || 'main' }}
3425 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
3526 NODE_VERSION : 24
3627 VERCEL_NODE_RUNTIME : nodejs24.x
@@ -136,8 +127,8 @@ jobs:
136127 echo "commit_message=chore(deps): update dependencies"
137128 } >> "$GITHUB_OUTPUT"
138129
139- - name : Commit and push changes (direct)
140- if : steps.check_changes.outputs.changes == 'true' && env.UPDATE_STRATEGY == 'direct'
130+ - name : Commit and push changes
131+ if : steps.check_changes.outputs.changes == 'true'
141132 run : |
142133 git config --global user.name "${OWNER_NAME}"
143134 git config --global user.email "${OWNER_EMAIL}"
@@ -152,19 +143,6 @@ jobs:
152143
153144 echo "✅ Changes committed and pushed to ${BASE_BRANCH}!"
154145
155- - name : Create pull request (pr)
156- id : cpr
157- if : steps.check_changes.outputs.changes == 'true' && env.UPDATE_STRATEGY == 'pr'
158- uses : peter-evans/create-pull-request@v8.1.1
159- with :
160- token : ${{ secrets.GITHUB_TOKEN }}
161- commit-message : ${{ steps.commit_msg.outputs.commit_message }}
162- title : ${{ steps.commit_msg.outputs.title }}
163- body : ${{ steps.commit_msg.outputs.title }}
164- branch : bot/auto-update-deps
165- base : ${{ env.BASE_BRANCH }}
166- delete-branch : true
167-
168146 - name : Summary
169147 if : always()
170148 run : |
@@ -173,7 +151,7 @@ jobs:
173151 echo "🤖 AUTO UPDATE SUMMARY"
174152 echo "════════════════════════════════════════════════════════"
175153 echo ""
176- echo "Strategy: ${{ env.UPDATE_STRATEGY } }"
154+ echo "Strategy: direct to ${BASE_BRANCH }"
177155 echo "Force Update: ${{ env.FORCE_UPDATE }}"
178156 echo ""
179157
@@ -184,13 +162,8 @@ jobs:
184162
185163 echo ""
186164
187- if [ "${{ env.UPDATE_STRATEGY }}" == "direct" ]; then
188- echo "✅ Changes pushed to ${{ env.BASE_BRANCH }} branch"
189- echo "📍 Commit: $(git rev-parse HEAD)"
190- else
191- echo "✅ Pull request created"
192- echo "🔗 PR: ${{ steps.cpr.outputs.pull-request-url }}"
193- fi
165+ echo "✅ Changes pushed to ${BASE_BRANCH} branch"
166+ echo "📍 Commit: $(git rev-parse HEAD)"
194167 else
195168 echo "✅ No updates needed - everything is current!"
196169
0 commit comments