Skip to content

Commit bc9babe

Browse files
cklinCopilot
andcommitted
Prepare live Dependabot automation runs
Run live automation on pushes to cklin/dependabot-automation. Load trusted controller and worker code from the exact pushed commit for push events, preserving main checkouts for all other triggers. Document the live-run behavior and follow-up processing after retries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d63bcb34-3969-4d14-b422-33728176ec03
1 parent a67313c commit bc9babe

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

‎.github/dependabot-automation/README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ protocol.
111111
## Trust boundaries and invariants
112112

113113
Trusted controller and worker instructions are checked out from `main`, never from
114-
the PR. Dispatching a feature branch does not make these checkouts load that branch.
114+
the dependency PR. For temporary live testing, pushes to
115+
`cklin/dependabot-automation` instead load the exact pushed commit and perform
116+
real PR operations. Follow-up processing after a CI retry requires another push
117+
until the automation workflow is on `main`. Other triggers still load `main`;
118+
dispatching a feature branch does not change that.
115119
`GITHUB_TOKEN` handles discovery, evaluation, approval, and failure reporting.
116120
Separately scoped `codeql-ci-app` tokens perform retries, merges, and publication.
117121
The worker receives only a read/inference token, never App credentials, and the CLI

‎.github/workflows/dependabot-automation.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Dependabot automation
22

33
on:
4+
push:
5+
branches: [cklin/dependabot-automation]
46
workflow_run:
57
workflows:
68
[
@@ -38,8 +40,8 @@ jobs:
3840
steps:
3941
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4042
with:
41-
# workflow_run is privileged: always load controller code from main.
42-
ref: main
43+
# Only branch-push live tests load the pushed code; other events use main.
44+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
4345
persist-credentials: false
4446
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
4547
id: discover

‎.github/workflows/dependabot-pr.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
evaluate:
2525
runs-on: ubuntu-latest
2626
permissions:
27-
# Required to disarm native auto-merge. This job only runs main's controller.
27+
# Required to disarm native auto-merge; this job only runs trusted code.
2828
contents: write
2929
actions: read
3030
pull-requests: write
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3737
with:
38-
ref: main
38+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
3939
persist-credentials: false
4040
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
4141
id: evaluate
@@ -63,7 +63,7 @@ jobs:
6363
steps:
6464
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6565
with:
66-
ref: main
66+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
6767
persist-credentials: false
6868
- name: Mint retry token
6969
id: app
@@ -103,7 +103,7 @@ jobs:
103103
steps:
104104
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
105105
with:
106-
ref: main
106+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
107107
persist-credentials: false
108108
- name: Approve pristine passing update
109109
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
@@ -143,7 +143,7 @@ jobs:
143143
steps:
144144
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
145145
with:
146-
ref: main
146+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
147147
path: trusted
148148
persist-credentials: false
149149
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -211,7 +211,7 @@ jobs:
211211
steps:
212212
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
213213
with:
214-
ref: main
214+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
215215
persist-credentials: false
216216
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
217217
with:
@@ -252,7 +252,7 @@ jobs:
252252
steps:
253253
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
254254
with:
255-
ref: main
255+
ref: ${{ github.event_name == 'push' && github.sha || 'main' }}
256256
persist-credentials: false
257257
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
258258
with:

0 commit comments

Comments
 (0)