Github Action - 更換成 beta v2 新的格式 (yaml)

Tips

只在 master branch 才會執行 job。

if: github.ref == 'refs/heads/master'

因為 push event 會發生在所有 branch,可以透過這個方式限制:只有在 master 才要 publish。

ref:https://github.community/t5/GitHub-Actions/GitHub-Actions-branch-conditional/m-p/29825#M171


目前限制 2019-10-09

Not cache artifacts and packages: We appreciate the feedback, it’s clear to us that this is necessary. We’re working on caching packages and artifacts between workflow executions, we’ll have it by mid-November.

目前還無法在 workflows 之間快取檔案,所以每次的 build,都需要重新拉取 dependency packages。當然 docker layer 也不會快取,所以都要重頭開始 build。

No Team Level Secret: This is something that is on our backlog for a future update.

目前還不支援 Team/Organization Level Secret,所以要到每個 repository 裡面設定 Secret,相當麻煩。

Reference