From 482fc1e719c9283d3d160366d8de0f9a4720078c Mon Sep 17 00:00:00 2001 From: Ian Chua Date: Fri, 25 Sep 2026 15:04:32 +0800 Subject: [PATCH] fix: cronjob checks against last ofl-ota-cronjob instead of post_merge_profiles --- .github/workflows/ofl-ota-cronjob.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ofl-ota-cronjob.yml b/.github/workflows/ofl-ota-cronjob.yml index fa267270b5..2b5e9a3b23 100644 --- a/.github/workflows/ofl-ota-cronjob.yml +++ b/.github/workflows/ofl-ota-cronjob.yml @@ -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')"