GitHub Actions Workflow

GitHub Actions workflow는 "YAML을 실행하는 파일"보다 repository event를 versioned automation으로 변환하는 control plane에 가깝다고 보는 것이 이해에 유리하다. trigger가 언제 실행할지를, job/runner가 어디서 실행할지를, step/action이 무엇을 실행할지를 분리해야 failure의 원인을 좁힐 수 있다.

event가 어떤 YAML version을 실행시키는가

flowchart LR
    E[Repository event / dispatch / schedule] --> T[on: trigger]
    T --> W[Workflow YAML]
    W --> J[Job]
    J --> R[Runner]
    R --> S[Ordered steps]
    S --> A[Script or action]

같은 workflow라도 event의 SHA/ref에 있던 file을 사용하므로, default branch에 있는 최신 YAML이 항상 적용된다고 가정하면 안 된다. trigger filter와 source revision은 "왜 실행됐는가"를 설명하는 핵심 evidence라는 관점에서 다뤄야 한다.

GitHub Actions reference는 workflow/job-level permissions, secrets, environments, concurrency, reusable workflow와 action reference를 별도 syntax boundary로 다룬다.[3] CI workflow를 다룰 때 trigger(언제)·runner/job(어디서)·step/action(무엇을)을 같은 layer로 뭉뚱그리면, event origin별 access boundary나 실행되지 않은 이유를 설명하지 못하게 된다고 보인다.

경계

실패 모드

관련

출처

테스트 질문


  1. github-actions-workflows.md — "A workflow is a configurable automated process that will run one or more jobs... will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule." / "Each job... execute on a runner machine and run a series of one or more steps." ↩︎ ↩︎

  2. github-actions-workflows.md — "An event occurs on your repository. The event has an associated commit SHA and Git ref... Each workflow run will use the version of the workflow that is present in the associated commit SHA or Git ref of the event. When a workflow runs, GitHub sets the GITHUB_SHA... and GITHUB_REF..." ↩︎

  3. github-actions-workflow-syntax.md — workflow/job-level permissions, secrets, environments, concurrency, reusable workflow와 action reference를 별도 섹션으로 다루는 reference 문서 구조(## permissions L606, ## concurrency L775, ## jobs.<job\_id>.environment L1274, ## jobs.<job\_id>.steps\[\*\].uses L1708, ## jobs.<job\_id>.uses L2651, ## jobs.<job\_id>.secrets L2700). ↩︎