RunnerのWorking Directory - CI/CD用語集の定義
runnerのworking directoryは、jobがコードをチェックアウトして実行する場所であり、GitHub ActionsではGITHUB_WORKSPACEとして利用できます。
runnerのworking directoryは、リポジトリがチェックアウトされjobが実行されるCI runner上のフォルダであり、GitHub ActionsではGITHUB_WORKSPACEとして公開されます。workflow内の相対パスはこれを基準に解決されます。
working directoryを知っておくと、移植性のあるstepを書いたり、誤った相対パスによる「file not found」エラーをデバッグしたりするのに役立ちます。
どこにあるか
self-hostedのrunnerはこれを_work/<repo>/<repo>の下に保存します。stepのworking-directory:を設定すれば、手動のcdなしでサブフォルダ内でコマンドを実行できます。
関連ガイド
Workspace Cleanup Step - CI/CD Glossary DefinitionWorkspace Cleanup Step: A workspace cleanup step is a pipeline task that deletes checked-out files and build…
Shallow Checkout Depth - CI/CD Glossary DefinitionShallow Checkout Depth: Shallow checkout depth is the number of recent commits fetched during a CI checkout,…