Skip to content
Latchkey

Context Expression - CI/CD 用語集の定義

context expression とは、workflow 内の ${{ ... }} テンプレートで、githubenvmatrixstepsneedsinputssecrets などの context から読み取って値を注入したり条件を評価したりします。

よくある context

github.sha は commit、github.ref は branch またはタグの ref、github.event_name はトリガーです。expression は演算子や関数もサポートするため、if: ${{ github.ref == 'refs/heads/main' }} は step を main branch に限定します。

関連ガイド