44 issue_comment :
55 types :
66 - created
7+ workflow_call :
8+ secrets :
9+ PULL_REQUEST_UPDATE_TOKEN :
10+ required : true
11+ inputs :
12+ dependabot :
13+ type : boolean
14+ required : false
15+ default : false
716
817jobs :
918 is-fork-pull-request :
2433 react-to-comment :
2534 name : React to the comment
2635 runs-on : ubuntu-latest
27- needs : is-fork-pull-request
36+ needs :
37+ - is-fork-pull-request
2838 # Early exit if this is a fork, since later steps are skipped for forks.
29- if : ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
39+ if : ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' && inputs.dependabot == false }}
3040 steps :
3141 - name : Checkout repository
3242 uses : actions/checkout@v4
4656 prepare :
4757 name : Prepare dependencies
4858 runs-on : ubuntu-latest
49- needs : is-fork-pull-request
59+ needs :
60+ - is-fork-pull-request
5061 # Early exit if this is a fork, since later steps are skipped for forks.
5162 if : ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
5263 outputs :
@@ -203,10 +214,13 @@ jobs:
203214 path : yarn.lock
204215 key : cache-yarn-lock-${{ needs.prepare.outputs.COMMIT_SHA }}
205216 fail-on-cache-miss : true
217+ - name : Set commit prefix
218+ if : ${{ inputs.dependabot == true }}
219+ run : echo "COMMIT_PREFIX='[dependabot skip] '" >> "$GITHUB_ENV"
206220 - name : Commit yarn.lock
207221 run : |
208222 git add yarn.lock
209- git commit -m "Deduplicate yarn.lock" || true
223+ git commit -m "${COMMIT_PREFIX} Deduplicate yarn.lock" || true
210224 - name : Restore LavaMoat policies
211225 uses : actions/cache/restore@v4
212226 with :
@@ -216,7 +230,7 @@ jobs:
216230 - name : Commit LavaMoat policies
217231 run : |
218232 git add packages/snaps-execution-environments/lavamoat
219- git commit -m "Update LavaMoat policies" || true
233+ git commit -m "${COMMIT_PREFIX} Update LavaMoat policies" || true
220234 - name : Restore examples
221235 uses : actions/cache/restore@v4
222236 with :
@@ -226,6 +240,6 @@ jobs:
226240 - name : Commit examples
227241 run : |
228242 git add packages/examples/packages
229- git commit -m "Update example snaps" || true
243+ git commit -m "${COMMIT_PREFIX} Update example snaps" || true
230244 - name : Push changes
231245 run : git push
0 commit comments