GitHub Actions の Marketplace action とは?
Marketplace action は GitHub Marketplace に公開された action で、1 行の uses: で workflow に組み込む準備ができています。
GitHub Marketplace はコミュニティやベンダーが作った action のカタログです。クラウドプロバイダーへの deploy から Slack 通知の投稿まであらゆるものをカバーしており、一般的なタスクを自分でスクリプト化する必要はめったにありません。
それは何か
Marketplace action は通常の action で、そのリポジトリが説明、カテゴリ、バージョン管理されたリリースとともに Marketplace に掲載されたものです。
Using Marketplace actions
steps:
- uses: actions/checkout@v4
- uses: docker/build-push-action@v6
with:
push: true
tags: myimage:latestどう動くか
Marketplace action を owner/name@version で参照するのは、他の action と同じです。GitHub は固定したバージョンでソースリポジトリからそれを取得し、ランナー上で実行します。
セキュリティと pinning
サードパーティのコードがパイプラインで実行されるため、action を完全なコミット SHA か信頼できるリリースに固定し、必要な権限を確認してください。サプライチェーンを真剣に扱いましょう。
なぜ重要か
Marketplace は一般的な雑務を 1 行の依存関係に変え、維持する YAML を劇的に減らしながらコミュニティのベストプラクティスを取り込みます。
関連する概念
Marketplace action は通常の action で、同じバージョニングと input のモデルに従います。actions/checkout のような公式のものの多くは基礎的です。
重要なポイント
- Marketplace action は公開され掲載された action です。
uses: owner/name@versionで参照します。- サプライチェーンの安全性のため SHA か信頼できるリリースに固定します。
関連ガイド
What Is an Action in GitHub Actions?An action is a reusable, packaged unit of work you invoke from a step with uses. Actions can be JavaScript, D…
What Is actions/checkout in GitHub Actions?actions/checkout is the official action that clones your repository onto the runner so subsequent steps can b…
What Is actions/cache in GitHub Actions?actions/cache stores and restores files like dependencies between runs using a key, speeding up workflows by…
What Is a Composite Action in GitHub Actions?A composite action bundles multiple steps into a single reusable action defined in YAML, so you can share ste…