fix(ci): repair auto-compress-manage — real SHA pins + 4 skip conditions - #243
Merged
Merged
Conversation
…p conditions The workflow on main failed all 781 runs: five action refs point at commit SHAs that do not exist upstream (Set up job -> "unable to find version"). Replaced with SHAs verified against the commit API. Implements the four documented skip conditions: 1. on.paths trigger filters (images + web assets) 2. bot-loop guard on scan — github.ref AND github.head_ref, null-safe 3. inputs.target gating on compress-images / compress-web 4. summary skips when both children are skipped Three intentional deviations from the original spec, each noted in the README: - '**/*.ext' instead of '**.ext' (the latter is YAML-invalid, not a GitHub glob) - head_ref added to the bot guard (github.ref is refs/pull/N/merge on PRs) - compression-level: 0 on upload-artifact (payload is already compressed) Ships to deliverables/ci/ because the GitHub App lacks the workflows permission to write .github/workflows/ directly. Includes a 26-check validator.
zyntromedia
pushed a commit
that referenced
this pull request
Sep 13, 2026
Four PRs merged on 2026-09-13 were absent from the changelog. Placed in the existing [2026-09-13] section, in the file's own order (PR number descending within each subsection). - **#245** (Added) — knowledge notes gained an index, a manifest and front matter, plus sync_knowledge_index.py to derive the index from the notes - **#240** (Added) — ci-workflow-authoring skill and lint.py; it flagged 9 of the 10 workflows then on main, all for the same unresolvable-ref reason - **#236** (Changed) — README rewritten to describe the tree as it stands - **#243** (Fixed) — auto-compress-manage.yml, failing at `Set up job` on all 781 runs: five action refs pointed at SHAs that do not exist upstream #239 is deliberately not recorded: it is a changelog PR, and this repository does not log its own changelog PRs (zero such entries exist). Surgical anchored inserts, not a regeneration — the file is 370 lines of hand-written prose and rewriting it would lose formatting and drop entries. 43 insertions, 0 deletions; date sections unchanged (6), per-subsection PR numbers verified descending, no duplicate PR refs introduced. Co-authored-by: Fig AI Agent <fig-ai-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
แก้
.github/workflows/auto-compress-manage.yml— เติม Skip Conditions ครบ 4 ข้อตามสเปคและซ่อม action ref ที่ทำให้ workflow ล้มทุก run
ไฟล์ปลายทาง:
deliverables/ci/auto-compress-manage.yml→.github/workflows/auto-compress-manage.ymlWhy (ตัว blocker ที่เจอก่อน)
Workflow นี้ ล้มทุก run (781 runs, ล่าสุด #779) ตั้งแต่ระดับ
Set up job:สาเหตุ: action ref 5 ตัวชี้ไปยัง SHA ที่ ไม่มีอยู่จริง ใน upstream repo —
ยืนยันแล้วด้วย commit API (
No commit found for SHA)calibreapp/image-actions@8c44b87c…26d5b54006db…peter-evans/create-pull-request@a5e986b9…22a9089034f4…stefh/ghaction-CompressFiles@9c8a7d6e…7abba5ba5b3c…actions/checkout@f548e57c…11d5960a3267…actions/upload-artifact@65462800…ea165f8d65b6…ถ้าเติมแค่ skip conditions โดยไม่แก้ ref นี้ workflow ก็ยังล้มอยู่ดี
Skip Conditions
on.paths(7 globs)scanscanข้าม branchauto/*และ commit ที่มี[skip ci]inputs.targetcompress-images/compress-webเคารพ dropdown ของworkflow_dispatchsummary3 จุดที่จงใจต่างจากสเปค
**.jpg→**/*.jpg— glob เดิมไม่ใช่ syntax ของ GitHub และใน YAML**.jpgทำให้ไฟล์ parse ไม่ผ่านทั้งไฟล์ ต้องมี
/คั่นhead_refใน bot guard — ตอนpull_requesteventgithub.refคือrefs/pull/N/mergeไม่ใช่refs/heads/...ถ้าเช็คแค่github.refguard จะไม่ทำงานเลยบน PRเพิ่ม
!startsWith(github.head_ref || '', 'auto/')— และต้องมี|| ''เพราะ push eventไม่มี
head_ref(ไม่งั้นเงื่อนไขกลายเป็น null ทั้งอัน)compression-level: 0บนupload-artifact—.br/.gzถูกบีบอัดมาแล้ว บีบอัดซ้ำไม่มีประโยชน์เพิ่ม
artifactsในตัวเลือกtargetให้ตรงกับเอกสาร (ปุ่มเดิมมี 3 ตัวเลือก และไม่มี job ไหนใช้ค่านี้เลย)Verification
26/26 checks passed — YAML parse, duplicate keys, glob ทั้ง 7, bot guard ทั้ง 3 เงื่อนไข,
inputs.target,summary, SHA-pin ครบ และยิง commit API ยืนยันว่า SHA ทุกตัว resolve จริงทำไมอยู่ใน
deliverables/App
fig-ai-agentไม่มีworkflowspermission — push เข้า.github/workflows/ตรงๆถูกปฏิเสธ (
refusing to allow a GitHub App to create or update workflow)เลือกทางใดทางหนึ่ง:
deliverables/ci/auto-compress-manage.yml→.github/workflows/auto-compress-manage.yml(commit เดียว ไม่ต้องแก้เนื้อหา)
fig-ai-agentสิทธิ์workflowsแล้วผม push เข้า.github/workflows/ให้ตรงๆNote
CI ของ PR นี้แดงจาก policy SHA-pin ใน
ci.ymlที่มีอยู่ก่อนแล้วบนmain— ไม่เกี่ยวกับ diff นี้Supersedes #242 (draft, ปิดได้)