Post stepとは?
Post stepは、メインのstepがどう終了したかに関わらず、jobが終了したときに何らかのロジックが自動で実行されるようアクションが宣言するフェーズです。アクションはこれを、cacheの保存、認証情報の削除、サービスの停止といったクリーンアップに使います。登録したアクションとは逆の順序で実行されます。
なぜ重要か
多くのアクションは、stepが失敗しても、更新したcacheの保存やtokenの取り消しのような、確実なteardownを必要とします。post stepは、呼び出し側が明示的なクリーンアップstepを書かなくても、信頼できるフックを提供します。一部のアクションが実行の終わりに自動でcacheエントリを保存するのはこのためです。
関連ガイド
What Is a Pre Step?A pre step is setup logic an action registers to run before the job's main steps begin, used to prepare the e…
What Is Action Metadata?Action metadata is the manifest file that declares an action's name, inputs, outputs, and how it runs, tellin…
What Is an Action Cache?An action cache stores files keyed by a string so later workflow runs can restore dependencies or build outpu…