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
echo "::group::$branch"
# post_merge_profiles.yml's own run history, not this workflow's: this
# workflow only ever runs against main (schedule, or workflow_dispatch
# --ref main), so its head branch never varies - filtering ITS history
# by $branch would never match anything except main. post_merge_profiles.yml
# genuinely runs per-branch (this dispatch below sets --ref "$branch"),
# so its history is the real per-branch checkpoint. It also means a
# failed publish naturally gets retried tomorrow: the checkpoint only
# advances on a run that actually succeeded.
# Use this workflow's own last successful run as the checkpoint. A
# successful post_merge_profiles.yml run may record an OFL merge as
# pending without publishing OFL, so its history must not advance
# this scan's checkpoint. Keep the branch filter aligned with the
# branch being inspected so each branch has its own checkpoint.
# A failed daily run naturally gets retried from the previous
# successful daily checkpoint; a branch with no prior run is
# treated as changed below.
# --method GET is required, not cosmetic: gh api defaults to POST
# whenever -f fields are present unless a method is given
# explicitly, and POST on this list-runs endpoint 404s - confirmed
# 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 \
--jq '.workflow_runs[0].run_started_at // empty')"