ci: สั่งรัน CI เองได้จากหน้า Actions - #2
Merged
Conversation
เพิ่ม workflow_dispatch เพื่อให้ re-run ตรวจ template ได้โดยไม่ต้อง push อะไรก่อน — มีประโยชน์ตอนอยากยืนยันว่า main ยังเขียวอยู่ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dru5ECsrJrqhTfUhUvDsqw
CI รอบแรกจับได้ว่า validate.sh บรรทัด 14 ทำ cd โดยไม่มี || exit ถ้า cd พลาดสคริปต์จะไปตรวจผิดโฟลเดอร์แล้วรายงานว่าผ่าน และช่องที่ทำให้พลาดตั้งแต่แรก: เครื่อง dev ที่ไม่มี shellcheck จะข้าม การตรวจไปเงียบ ๆ แล้วไปแดงเอาบน CI — ตอนนี้ถ้าอยู่ใน CI แล้วไม่เจอ shellcheck จะ fail ทันที ส่วนบนเครื่องจะเตือนชัดว่า CI ยังรันให้อยู่ Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dru5ECsrJrqhTfUhUvDsqw
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.
เพิ่ม
workflow_dispatchให้ workflowCIเพื่อให้ re-run ได้จากหน้า Actions โดยไม่ต้อง pushPR นี้ทำหน้าที่สองอย่าง: เพิ่มความสะดวก และเป็นตัวยืนยันว่า trigger
pull_requestทำงานแล้วหลังจาก workflow ถูก register บน default branch (PR #1 merge โดยที่ Actions ยังไม่รู้จัก workflow เลยไม่มี run)
ทดสอบยังไง
ผ่านทั้งหมดบนเครื่อง — และ CI ของ PR นี้เองคือหลักฐานว่า trigger ทำงาน