fix: cronjob checks against last ofl-ota-cronjob instead of post_merge_profiles

This commit is contained in:
Ian Chua
2026-09-25 15:04:32 +08:00
parent 9d320954a0
commit 482fc1e719
+9 -9
View File
@@ -62,19 +62,19 @@ jobs:
for branch in "${branches[@]}"; do for branch in "${branches[@]}"; do
echo "::group::$branch" echo "::group::$branch"
# post_merge_profiles.yml's own run history, not this workflow's: this # Use this workflow's own last successful run as the checkpoint. A
# workflow only ever runs against main (schedule, or workflow_dispatch # successful post_merge_profiles.yml run may record an OFL merge as
# --ref main), so its head branch never varies - filtering ITS history # pending without publishing OFL, so its history must not advance
# by $branch would never match anything except main. post_merge_profiles.yml # this scan's checkpoint. Keep the branch filter aligned with the
# genuinely runs per-branch (this dispatch below sets --ref "$branch"), # branch being inspected so each branch has its own checkpoint.
# so its history is the real per-branch checkpoint. It also means a # A failed daily run naturally gets retried from the previous
# failed publish naturally gets retried tomorrow: the checkpoint only # successful daily checkpoint; a branch with no prior run is
# advances on a run that actually succeeded. # treated as changed below.
# --method GET is required, not cosmetic: gh api defaults to POST # --method GET is required, not cosmetic: gh api defaults to POST
# whenever -f fields are present unless a method is given # whenever -f fields are present unless a method is given
# explicitly, and POST on this list-runs endpoint 404s - confirmed # explicitly, and POST on this list-runs endpoint 404s - confirmed
# on real Actions infrastructure, not just reasoned about. # on real Actions infrastructure, not just reasoned about.
since="$(gh api --method GET "repos/${{ github.repository }}/actions/workflows/post_merge_profiles.yml/runs" \ since="$(gh api --method GET "repos/${{ github.repository }}/actions/workflows/ofl-ota-cronjob.yml/runs" \
-f status=success -f branch="$branch" -f per_page=1 \ -f status=success -f branch="$branch" -f per_page=1 \
--jq '.workflow_runs[0].run_started_at // empty')" --jq '.workflow_runs[0].run_started_at // empty')"