본문 바로가기
C.W.K.
Stream
Lesson 11 of 12 · published

워크플로 실행

~11 min · runs, logs, debugging

Level 0견습생
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Actions 탭에서 실제로 보는 화면

실행 조건마다 실행을 만들어. 실행은 고유 ID, 작업 목록, 단계별 로그, 아티팩트, 최종 결과(success, failure, cancelled, skipped, timed_out, action_required, neutral)를 갖고 있어.

실행 내용 읽기

  1. 요약 보기 — 워크플로 그래프에서 각 작업이 노드, needs:가 엣지로 그려져. 작업을 클릭하면 단계를 볼 수 있어.
  2. 단계 로그 — 단계별 전체 stdout/stderr야. 상단 검색창으로 모든 단계에서 grep할 수 있어.
  3. 아티팩트upload-artifact로 업로드한 파일이야. 로컬 디버깅하려고 다운로드해.
  4. 다시 실행 — 모든 작업, 실패한 작업만, 또는 디버그 로깅을 켜서 다시 실행할 수 있어.
  5. 취소 — 진행 중인 실행을 중단해.

디버그 로깅

저장소나 워크플로 비밀값을 설정해:

  • ACTIONS_RUNNER_DEBUG = true — 러너의 상세 로그를 켜.
  • ACTIONS_STEP_DEBUG = true — 단계의 상세 로그를 켜.

아니면 실행 UI에서 'Re-run with debug logging'을 클릭해. 로그가 5~10배 길어지지만 러너가 하는 모든 API 호출을 볼 수 있어.

Code

CLI에서 워크플로 실행 관찰·bash
# Show the most recent run of every workflow
gh run list --limit 5

# Watch a specific run live (auto-tails until completion)
gh run watch <run-id>

# Show the failed step's logs only
gh run view <run-id> --log-failed

# Re-run only the failed jobs
gh run rerun <run-id> --failed

# Cancel an in-progress run
gh run cancel <run-id>

External links

Exercise

단계 하나를 의도적으로 깨뜨리는 커밋을 푸시해(예: 테스트 스크립트에 exit 1). 터미널에서 gh run watch로 실패할 때까지 기다려. 그다음 gh run view --log-failed로 실패한 부분을 찾아. 고치고 나서 gh run rerun --failed로 다시 실행해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.