Let's say I have a github action like this:
name: My Action
on:
pull_request:
types:
- closed
jobs:
myjob:
runs-on: ubuntu-latest
name: Test
if: github.event.pull_request.merged && XXX
I would like to have a condition here to test the presence of a label.
From the docs, using contains( github.event.pull_request.labels, 'my_label')
doesn't seem appropriate since it's a dictionary and not an array.
Is there any way around this?
Finally found it:
contains( github.event.pull_request.labels.*.name, 'My Label')