C.W.K.
Stream
Lesson 06 of 12 · published

Action

~11 min · actions, marketplace, uses

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

재사용 가능한 작업 단위

Action 은 step 에서 호출되는 재사용 가능한 매개변수화된 작업 단위야. 세 종류:

  1. JavaScript action — repo 의 Node.js 코드. Runner 에서 직접 돔. 빠르고 크로스 플랫폼.
  2. Docker action — Docker image 로 패키징. Linux runner 만. 시작 느리고 완전 격리된 env.
  3. Composite action — 단일 step 처럼 호출 가능한 YAML 'mini-workflow' step 들. (Reuse track 에서 다룸.)

Action 참조 방식

  • Public action: uses: actions/checkout@v4
  • Tag pin (실제로는 immutable): uses: actions/checkout@v4.2.0
  • SHA pin (진짜 immutable): uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
  • 아빠 repo: uses: ./.github/actions/setup-node
  • 다른 repo: uses: my-org/my-action@v1

Input 과 output

Value 는 with: 로 전달. Value 는 steps.<id>.outputs.<name> 로 읽음. Action 저자가 둘 다 README 에 문서화.

Code

세 가지 pin 스타일, 점진적 안전·yaml
steps:
  # 1) loose tag — auto-updates within the major version. risky.
  - uses: actions/checkout@v4

  # 2) full version — locked to a specific release. better.
  - uses: actions/checkout@v4.2.2

  # 3) full SHA — bit-for-bit identical run. best for security-critical workflows.
  - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

External links

Exercise

Workflow 하나 가져와. 모든 uses: 참조에 대해, action 을 repo 에서 찾아 tag pin 을 SHA pin 으로 바꿔. Release tag 노출 안 하는 action 적어 (빨간 flag — 조사).

Progress

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

댓글 0

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

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