Interview Prep/GitHub Actions/Expressions, Outputs, Matrix & Conditions

`if: contains(github.event.pull_request.labels, 'deploy')` never matches.

BeginnerTroubleshootingExpressions, Outputs, Matrix & Conditions
Answer

Likely causes → labels is an array of objects, not strings.

Diagnose → echo '${{ toJSON(github.event.pull_request.labels) }}' via env.

Fix → contains(github.event.pull_request.labels.*.name, 'deploy').

Prevent → Use object filters for arrays of objects.

All GitHub Actions questions Roadmap: GitHub Actions

More on Expressions, Outputs, Matrix & Conditions