@@ -5,19 +5,21 @@ name: refresh
55# topological order (parents before children).
66on :
77 workflow_dispatch :
8+ inputs :
9+ build :
10+ description : " Dispatch builds for outdated targets (always on for scheduled runs)."
11+ type : boolean
12+ default : true
813 schedule :
914 - cron : " 0 6 * * *" # daily at 06:00 UTC
1015
1116permissions :
1217 contents : read
18+ actions : write # required to dispatch build.yaml
1319
1420jobs :
15- plan :
21+ refresh :
1622 runs-on : ubuntu-latest
17- outputs :
18- # JSON array of node ids (target references) in topological order.
19- targets : ${{ steps.outdated.outputs.targets }}
20- count : ${{ steps.outdated.outputs.count }}
2123 steps :
2224 - uses : actions/checkout@v6
2325
@@ -50,19 +52,16 @@ jobs:
5052 name : graph
5153 path : graph.json
5254
53- dispatch :
54- needs : plan
55- if : needs.plan.outputs.count != '0'
56- runs-on : ubuntu-latest
57- permissions :
58- contents : read
59- actions : write # required to dispatch build.yaml
60- steps :
6155 - name : Dispatch builds in topological order
56+ # Scheduled runs always build; manual runs build only when requested, so a
57+ # workflow_dispatch can be used to inspect the plan artifact without building.
58+ if : >-
59+ steps.outdated.outputs.count != '0' &&
60+ (github.event_name == 'schedule' || inputs.build)
6261 env :
6362 GH_TOKEN : ${{ github.token }}
6463 REF : ${{ github.ref_name }}
65- TARGETS : ${{ needs.plan .outputs.targets }}
64+ TARGETS : ${{ steps.outdated .outputs.targets }}
6665 run : |
6766 # Dispatch each build sequentially and wait for it to finish before
6867 # the next, so an internal base is pushed before its dependents build.
0 commit comments