xenoterracide
xenoterracide

Reputation: 16837

Is it possible to do pattern matching in if conditional for github actions?

I'm currently doing this:

if: failure() && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/mybranch')

But we're using git flow (much to my chagrin).

How could I check if the branch name contains a specific pattern?

Something like this:

if: failure() && ( !(github.ref ~= 'feature/*' )

Upvotes: 5

Views: 4925

Answers (1)

xenoterracide
xenoterracide

Reputation: 16837

contains appears to be as good as it gets

        if: failure() && !contains( github.ref, 'feature' )

Upvotes: 6

Related Questions