Does github actions support regex?

I’m trying to run a job but only if the branch is ID*. Does the bash shell support a regex like:

  if [[ env.branch =~ '[I][D][0-9]' ]] ; then
   ... stuff...
  fi
  exit 0
shell: bash

Bash supports POSIX-style regular expressions with the =~ operator, but it doesn’t know about the GitHub Actions variable syntax. If you have an environment variable called branch, you can access it with "${branch}" (quotes optional but usually a good idea).

So you could do something like

if [[ "${branch}" =~ ID.* ]]

for a condition that’s true if the value of the branch environment variable starts with ID.