Skip to main content

Workflow artifacts

Learn about storing and sharing data as artifacts of GitHub Actions workflows.

About workflow artifacts

An artifact is a file or collection of files produced during a workflow run. Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. For example, you can use artifacts to save your build and test output after a workflow run has ended.

GitHub provides two actions that you can use to upload and download build artifacts, upload-artifact and download-artifact on GitHub Enterprise Server.

Common artifacts include:

  • Log files and core dumps
  • Test results, failures, and screenshots
  • Binary or compressed files
  • Stress test performance output and code coverage results

成果物の比較と依存関係のキャッシング

成果物とキャッシングは、GitHubにファイルを保存できるようにするので似ていますが、それぞれの機能のユースケースは異なっており、入れ替えて使うことはできません。

  • パッケージ管理システムからのビルドの依存関係など、ジョブまたはワークフローの実行の間で頻繁に変更されないファイルを再利用する場合は、キャッシュを使用します。
  • ビルドされたバイナリやビルド ログなど、ワークフローの実行が終了した後に表示するためにジョブによって生成されたファイルを保存する場合は、成果物を使用します。

For more information on dependency caching, see Dependency caching reference.

削除されたワークフロー実行の成果物

ワークフロー実行が削除されると、その実行に関連付けられたすべての成果物もストレージから削除されます。 ワークフロー実行を削除するには、GitHub Actions UI、REST API、または GitHub CLI を使います。「ワークフロー実行の削除」、「ワークフロー実行を削除する」、または「gh run delete」を参照してください。