GitHub Actions 入門
Machine Learning 的 CI/CD
Ravi Bhadauria
Machine Learning Engineer
什麼是 GitHub Actions?
GitHub Actions(GHA)
:用於自動化「
pipelines
」的 CI/CD 平台
Pipeline
:一連串步驟,表示工作與資料的流程
什麼是 GitHub Actions?
什麼是 GitHub Actions?
1
https://medium.com/empathyco/applying-ci-cd-using-github-actions-for-android-1231e40cc52f
GHA 元件:Event
Event
:在儲存庫中的特定活動,會觸發 workflow 執行
Push
Pull Request
開啟 issue
GHA 元件:Workflow
Workflow
:會執行一個或多個 jobs 的自動化流程
以 YAML 檔定義
由
event
自動觸發
也可手動執行
放在儲存庫的
.github/workflows
目錄
可定義多個 workflows
GHA 元件:Steps 與 Actions
Steps
:個別的工作單位
依序執行,依賴前一步
在同一台機器上跑,可共享資料
工作單位範例
編譯應用程式、shell 指令稿
Action
:GHA 平台專用的應用程式
例如檢出 repo、在 PR 留言
GHA 元件:Jobs 與 Runners
Job
:由多個
steps
組成
各 job 彼此獨立
可平行執行
由稱為
runners
的運算機器執行
簡單的 GHA workflow
Event
:Push
Job
:在
Ubuntu
runner
上執行,包含兩個
steps
Action
:Checkout Repo
Run Python Code
整體串起來
一起來練習吧!
Machine Learning 的 CI/CD
Preparing Video For Download...