開発者として、自動化の再利用に関する標準を実装するために、どのような2つの選択肢を推奨すべきでしょうか?正解はそれぞれ完全な解決策を示しています。注:正解1つにつき1ポイントです。
正解:A,C
[A]
Implementing standards for reusable actions and workflows is the most effective way to reduce duplication and maintain consistency across your GitHub organization.
Reusable Workflows (workflow_call)
Best for standardizing entire processes (e.g., a complete CI/CD pipeline).
Location: Defined in .github/workflows/ of a central repository.
Trigger: Use the on: workflow_call trigger to define inputs, secrets, and outputs.
Usage: Called from another workflow using the uses keyword (e.g.,
owner/repo/.github/workflows/ci.yml@v1).
Benefit: They allow you to enforce security scans, build steps, and deployment gates across multiple repositories from a single source
[C]
Implementing a marketplace partition for internal GitHub Actions is a key strategy for scaling automation securely and efficiently across a company. This centralized approach ensures that developers use vetted, high-quality automation while adhering to corporate standards.
Strategic Implementation of Internal Reuse
To implement standards for automation reuse effectively, focus on these core components:
[C] Internal Actions Marketplace: Create a dedicated organization or specific repositories to host and display shared actions. This "marketplace" acts as a curated directory of approved automations, preventing the use of unverified third-party actions from the public marketplace.
Workflow Templates: Store standardized workflow templates in your organization's .github repository. These templates appear in the "Actions" tab when a user creates a new workflow, ensuring consistency across different teams.
[A] Reusable Workflows: Design modular workflows that can be called by other repositories using the uses keyword. Unlike standard actions, these can manage entire jobs and runners, making them ideal for standardizing complex CI/CD pipelines.
Internal Repository Sharing: Set repository visibility to Internal and configure Actions permissions to allow access from other repositories in the organization or enterprise.
Reference:
https://www.incredibuild.com/blog/best-practices-to-create-reusable-workflows-on-github-actions
https://xebia.com/blog/setting-up-an-internal-github-actions-marketplace