Skip to content
Latchkey

Conditional Execution - CI/CD用語集の定義

conditional execution は、条件が満たされたときにのみ job またはステップを実行することで、GitHub Actions では if: 式で制御されます。

conditional execution は、条件が満たされたときにのみ job またはステップを実行することで、GitHub Actions では if: 式で制御されます。

conditional execution により、1 つの workflow が YAML を複製せずに、branch、イベント、または前のステップの結果ごとに異なる動作をできます。

.github/workflows/ci.yml
deploy:
  if: github.ref == 'refs/heads/main'
  runs-on: ubuntu-latest

関連ガイド